public class ReflectWrapper extends Object
| Constructor and Description |
|---|
ReflectWrapper(java.lang.ClassLoader loader,
String name)
Construct a wrapped object using the no arg constructor.
|
ReflectWrapper(Object obj)
Constructor using a passed in object.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public ReflectWrapper(java.lang.ClassLoader loader,
String name)
loader - the classloader to use to construct the class.name - the classname of the object to construct.public ReflectWrapper(Object obj)
obj - the object to wrap.public Object getObject()
public Object invoke(String methodName)
methodName - the name of the method to callpublic Object invoke(String methodName, Class argType, Object arg)
methodName - the name of the method to callargType - the type of argument.arg - the value of the argument.public Object invoke(String methodName, Class argType1, Object arg1, Class argType2, Object arg2)
methodName - the name of the method to callargType1 - 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.