MethodInvoker that tries to convert the given
arguments for the actual target method via a TypeConverter.
Supports flexible argument conversions, in particular for invoking a specific overloaded method.
org.springframework.beans.BeanWrapperImpl#convertIfNecessary
| Modifier and Type | Field and Description |
|---|---|
| private TypeConverter | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected Method | Returns: a matching method, ornull if nonethe argument values to match against method parameters arguments)Actually find a method with matching parameter type, i.e. where each argument value is assignable to the corresponding parameter type. |
| protected Method | findMatchingMethod()
Overrides org. This implementation looks for a method with matching parameter types. |
| protected TypeConverter | |
| public TypeConverter | |
| public void | registerCustomEditor(Class<?>
type of the property requiredType, PropertyEditor editor to register propertyEditor)Register the given custom property editor for all properties of the given type. |
| public void | setTypeConverter(TypeConverter typeConverter)
Set a TypeConverter to use for argument type conversion. |
| typeConverter | back to summary |
|---|---|
| private TypeConverter typeConverter
| |
| useDefaultConverter | back to summary |
|---|---|
| private boolean useDefaultConverter | |
| ArgumentConvertingMethodInvoker | back to summary |
|---|---|
| public ArgumentConvertingMethodInvoker() | |
| doFindMatchingMethod | back to summary |
|---|---|
| protected Method doFindMatchingMethod(Object[] arguments) Actually find a method with matching parameter type, i.e. where each argument value is assignable to the corresponding parameter type. | |
| findMatchingMethod | back to summary |
|---|---|
| protected Method findMatchingMethod() Overrides org. This implementation looks for a method with matching parameter types.
| |
| getDefaultTypeConverter | back to summary |
|---|---|
| protected TypeConverter getDefaultTypeConverter() Obtain the default TypeConverter for this method invoker. Called if no explicit TypeConverter has been specified.
The default implementation builds a
| |
| getTypeConverter | back to summary |
|---|---|
| public TypeConverter getTypeConverter() Return the TypeConverter used for argument type conversion. Can be cast to
| |
| registerCustomEditor | back to summary |
|---|---|
| public void registerCustomEditor(Class<?> requiredType, PropertyEditor propertyEditor) Register the given custom property editor for all properties of the given type. Typically used in conjunction with the default
| |
| setTypeConverter | back to summary |
|---|---|
| public void setTypeConverter(TypeConverter typeConverter) Set a TypeConverter to use for argument type conversion. Default is a | |