org.springframework.beans.support
Class ArgumentConvertingMethodInvoker

java.lang.Object
  extended by org.springframework.util.MethodInvoker
      extended by org.springframework.beans.support.ArgumentConvertingMethodInvoker
Direct Known Subclasses:
MethodInvokingFactoryBean, MethodInvokingJobDetailFactoryBean, MethodInvokingTimerTaskFactoryBean

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)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.util.MethodInvoker
MethodInvoker.VoidType
 
Field Summary
 
Fields inherited from class org.springframework.util.MethodInvoker
VOID
 
Constructor Summary
ArgumentConvertingMethodInvoker()
           
 
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
 

Constructor Detail

ArgumentConvertingMethodInvoker

public ArgumentConvertingMethodInvoker()
Method Detail

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 property
propertyEditor - editor to register
See Also:
BeanWrapper.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-2005 The Spring Framework Project.