Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » beans » support » [javadoc | source]
org.springframework.beans.support
public class: ArgumentConvertingMethodInvoker [javadoc | source]
java.lang.Object
   org.springframework.util.MethodInvoker
      org.springframework.beans.support.ArgumentConvertingMethodInvoker

Direct Known Subclasses:
    MethodInvokingTimerTaskFactoryBean, MethodInvokingRunnable, MethodInvokingFactoryBean, MethodInvokingJobDetailFactoryBean

Subclass of 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.

Method from org.springframework.beans.support.ArgumentConvertingMethodInvoker Summary:
doFindMatchingMethod,   findMatchingMethod,   getDefaultTypeConverter,   getTypeConverter,   registerCustomEditor,   setTypeConverter
Methods from org.springframework.util.MethodInvoker:
findMatchingMethod,   getArguments,   getPreparedMethod,   getTargetClass,   getTargetMethod,   getTargetObject,   getTypeDifferenceWeight,   invoke,   isPrepared,   prepare,   resolveClassName,   setArguments,   setStaticMethod,   setTargetClass,   setTargetMethod,   setTargetObject
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.beans.support.ArgumentConvertingMethodInvoker Detail:
 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.
 protected Method findMatchingMethod() 
    This implementation looks for a method with matching parameter types.
 protected TypeConverter getDefaultTypeConverter() 
    Obtain the default TypeConverter for this method invoker.

    Called if no explicit TypeConverter has been specified. The default implementation builds a org.springframework.beans.SimpleTypeConverter . Can be overridden in subclasses.

 public TypeConverter getTypeConverter() 
    Return the TypeConverter used for argument type conversion.

    Can be cast to org.springframework.beans.PropertyEditorRegistry if direct access to the underlying PropertyEditors is desired (provided that the present TypeConverter actually implements the PropertyEditorRegistry interface).

 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 org.springframework.beans.SimpleTypeConverter ; will work with any TypeConverter that implements the PropertyEditorRegistry interface as well.

 public  void setTypeConverter(TypeConverter typeConverter) 
    Set a TypeConverter to use for argument type conversion.

    Default is a org.springframework.beans.SimpleTypeConverter . Can be overridden with any TypeConverter implementation, typically a pre-configured SimpleTypeConverter or a BeanWrapperImpl instance.