org.apache.tools.ant.util
public class ReflectWrapper extends Object
Constructor Summary | |
---|---|
ReflectWrapper(ClassLoader loader, String name)
Construct a wrapped object using the no arg constructor. | |
ReflectWrapper(Object obj)
Constructor using a passed in object. |
Method Summary | |
---|---|
Object | getObject() |
Object | invoke(String methodName)
Call a method on the object with no parameters. |
Object | invoke(String methodName, Class argType, Object arg)
Call a method on the object with one argument. |
Object | invoke(String methodName, Class argType1, Object arg1, Class argType2, Object arg2)
Call a method on the object with one argument. |
Parameters: loader the classloader to use to construct the class. name the classname of the object to construct.
Parameters: obj the object to wrap.
Returns: the wrapped object.
Parameters: methodName the name of the method to call
Returns: the object returned by the method
Parameters: methodName the name of the method to call argType the type of argument. arg the value of the argument.
Returns: the object returned by the method
Parameters: methodName the name of the method to call argType1 the type of the first argument. arg1 the value of the first argument. argType2 the type of the second argument. arg2 the value of the second argument.
Returns: the object returned by the method