public class Reflector
extends java.lang.Object
| Constructor and Description |
|---|
Reflector(java.lang.Object obj)
Constructor using a passed in object.
|
Reflector(java.lang.String name)
Constructor for the wrapper using a classname
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
call(java.lang.String methodName)
Call a method on the object with no parameters.
|
java.lang.Object |
call(java.lang.String methodName,
java.lang.Object o)
Call a method with one parameter.
|
java.lang.Object |
call(java.lang.String methodName,
java.lang.Object o1,
java.lang.Object o2)
Call a method with two parameters.
|
java.lang.Object |
callExplicit(java.lang.String methodName,
java.lang.Class classType,
java.lang.Object o)
Call a method with an object using a specific
type as for the method parameter.
|
java.lang.Object |
callExplicit(java.lang.String methodName,
java.lang.String className,
java.lang.Object o)
Call a method with an object using a specific
type as for the method parameter.
|
java.lang.Object |
getObject() |
public Reflector(java.lang.String name)
name - the classname of the object to construct.public Reflector(java.lang.Object obj)
obj - the object to wrap.public java.lang.Object getObject()
public java.lang.Object call(java.lang.String methodName)
methodName - the name of the method to callpublic java.lang.Object callExplicit(java.lang.String methodName,
java.lang.String className,
java.lang.Object o)
methodName - the name of the methodclassName - the name of the class of the parameter of the methodo - the object to use as the argument of the methodpublic java.lang.Object callExplicit(java.lang.String methodName,
java.lang.Class classType,
java.lang.Object o)
methodName - the name of the methodclassType - the class of the parameter of the methodo - the object to use as the argument of the methodpublic java.lang.Object call(java.lang.String methodName,
java.lang.Object o)
methodName - the name of the method to callo - the object to use as the parameter, this must
be of the same type as the method parameter (not a subclass).public java.lang.Object call(java.lang.String methodName,
java.lang.Object o1,
java.lang.Object o2)
methodName - the name of the method to callo1 - the object to use as the first parameter, this must
be of the same type as the method parameter (not a subclass).o2 - the object to use as the second parameter, this must
be of the same type as the method parameter (not a subclass).