org.springframework.beans.support
Class ArgumentConvertingMethodInvoker
java.lang.Object
org.springframework.util.MethodInvoker
org.springframework.beans.support.ArgumentConvertingMethodInvoker
- Direct Known Subclasses:
- MethodInvokingFactoryBean, MethodInvokingJobDetailFactoryBean, MethodInvokingRunnable
public class ArgumentConvertingMethodInvoker
- extends MethodInvoker
Subclass of MethodInvoker that tries to convert the given arguments
for the actual target method via BeanWrapperImpl.
Supports flexible argument conversions, in particular for
invoking a specific overloaded method.
- Since:
- 1.1
- Author:
- Juergen Hoeller
- See Also:
BeanWrapperImpl.doTypeConversionIfNecessary(java.lang.Object, java.lang.Class)
Method Summary |
protected Method |
findMatchingMethod()
This implementation looks for a method with matching parameter types:
that is, where each argument value is assignable to the corresponding parameter type. |
void |
registerCustomEditor(Class requiredType,
PropertyEditor propertyEditor)
Register the given custom property editor for all properties
of the given type. |
Methods inherited from class org.springframework.util.MethodInvoker |
getArguments, getPreparedMethod, getTargetClass, getTargetMethod, getTargetObject, invoke, prepare, setArguments, setStaticMethod, setTargetClass, setTargetMethod, setTargetObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArgumentConvertingMethodInvoker
public ArgumentConvertingMethodInvoker()
registerCustomEditor
public void registerCustomEditor(Class requiredType,
PropertyEditor propertyEditor)
- Register the given custom property editor for all properties
of the given type.
- Parameters:
requiredType
- type of the propertypropertyEditor
- editor to register- See Also:
PropertyEditorRegistry.registerCustomEditor(java.lang.Class, java.beans.PropertyEditor)
findMatchingMethod
protected Method findMatchingMethod()
- This implementation looks for a method with matching parameter types:
that is, where each argument value is assignable to the corresponding parameter type.
- Overrides:
findMatchingMethod
in class MethodInvoker
- Returns:
- a matching method, or
null
if none - See Also:
MethodInvoker.getTargetClass()
,
MethodInvoker.getTargetMethod()
,
MethodInvoker.getArguments()
Copyright (c) 2002-2007 The Spring Framework Project.