Helper class that allows for specifying a method to invoke in a declarative
fashion, be it static or non-static.
Usage: Specify "targetClass"/"targetMethod" or "targetObject"/"targetMethod",
optionally specify arguments, prepare the invoker. Afterwards, you may
invoke the method any number of times, obtaining the invocation result.
The invoker needs to have been prepared before.
the object (possibly null) returned by the method invocation,or null if the method has a void return type throws: InvocationTargetException - if the target method threw an exception throws: IllegalAccessException - if the target method couldn't be accessed See Also:MethodInvoker.prepare
The default implementations uses ClassUtils.forName,
using the thread context class loader.
Parameters: className - the class name to resolve the resolved Class throws: ClassNotFoundException - if the class name was invalid
setArguments
public void setArguments(Object[] arguments)(Code)
Set arguments for the method invocation. If this property is not set,
or the Object array is of length 0, a method with no arguments is assumed.
setStaticMethod
public void setStaticMethod(String staticMethod)(Code)
Set a fully qualified static method name to invoke,
e.g. "example.MyExampleClass.myExampleMethod".
Convenient alternative to specifying targetClass and targetMethod.
See Also:MethodInvoker.setTargetClass See Also:MethodInvoker.setTargetMethod
setTargetClass
public void setTargetClass(Class targetClass)(Code)
Set the target class on which to call the target method.
Only necessary when the target method is static; else,
a target object needs to be specified anyway.
See Also:MethodInvoker.setTargetObject See Also:MethodInvoker.setTargetMethod
setTargetMethod
public void setTargetMethod(String targetMethod)(Code)