|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.plumtree.openfoundation.reflect.XPReflect
public class XPReflect
Helper class to access java.lang.reflect.Method.invoke() or System.Reflection.MethodInfo.Invoke() methods.
| Constructor Summary | |
|---|---|
XPReflect()
|
|
| Method Summary | |
|---|---|
static java.lang.reflect.Method |
FindPublicMethod(java.lang.Object target,
java.lang.String methodName,
java.lang.Class actualParamType)
Find a publicly declated method from the given target object. |
static java.lang.Object |
InvokeGetMethod(java.lang.Object target,
java.lang.String fieldName)
Invoke a getMethod from target object. |
static java.lang.Object |
InvokeMethod(java.lang.Object target,
java.lang.String methodName)
Invoke a method with no input parameters from target object. |
static java.lang.Object |
InvokeMethod(java.lang.Object target,
java.lang.String methodName,
java.lang.Class[] paramTypes,
java.lang.Object[] paramValues)
Invoke a method with required parameters and corresponding types from target object. |
static java.lang.Object |
InvokeMethod(java.lang.Object target,
java.lang.String methodName,
java.lang.Object paramOne)
Invoke a method with one input parameters from target object. |
static java.lang.Object |
InvokeMethod(java.lang.Object target,
java.lang.String methodName,
java.lang.Object[] paramValues)
Invoke a method with required parameters from target object. |
static java.lang.Object |
InvokePublicMethod(java.lang.Object target,
java.lang.String methodName,
java.lang.Object singleParam)
Invoke a public method that requires only one parameter from target object. |
static java.lang.Object |
InvokePublicMethodUnchecked(java.lang.Object target,
java.lang.String methodName,
java.lang.Object singleParam)
Invoke a public method that requires only one parameter from target object. |
static java.lang.Object |
InvokeSetMethod(java.lang.Object target,
java.lang.String methodName,
java.lang.Object paramOne)
Invoke a setMethod from target object. |
static java.lang.String |
ToInitCase(java.lang.String txt)
Capitalize 1st character of input string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XPReflect()
| Method Detail |
|---|
public static java.lang.reflect.Method FindPublicMethod(java.lang.Object target,
java.lang.String methodName,
java.lang.Class actualParamType)
target - the object the underlying method is invoked frommethodName - name of method to be invoked from the target objectactualParamType - the arguments used for the method call
public static java.lang.Object InvokeMethod(java.lang.Object target,
java.lang.String methodName)
target - the object the underlying method is invoked frommethodName - name of method to be invoked from the target object
public static java.lang.Object InvokeMethod(java.lang.Object target,
java.lang.String methodName,
java.lang.Object paramOne)
target - the object the underlying method is invoked frommethodName - name of method to be invoked from the target objectparamOne - input object
public static java.lang.Object InvokeSetMethod(java.lang.Object target,
java.lang.String methodName,
java.lang.Object paramOne)
target - the object the underlying method is invoked frommethodName - field name to be assignedparamOne - input object
public static java.lang.Object InvokeMethod(java.lang.Object target,
java.lang.String methodName,
java.lang.Object[] paramValues)
target - the object the underlying method is invoked frommethodName - name of setMethod to be invoked from the target objectparamValues - an object array for input parameters
public static java.lang.Object InvokeMethod(java.lang.Object target,
java.lang.String methodName,
java.lang.Class[] paramTypes,
java.lang.Object[] paramValues)
target - the object the underlying method is invoked frommethodName - name of setMethod to be invoked from the target objectparamTypes - an array of corresponding data types of input objectsparamValues - an array of objects for method input parameters
public static java.lang.Object InvokePublicMethod(java.lang.Object target,
java.lang.String methodName,
java.lang.Object singleParam)
throws java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException
target - the object the underlying method is invoked frommethodName - name of setMethod to be invoked from the target objectsingleParam - input object
java.lang.reflect.InvocationTargetException - if the underlying method throws an
exception
java.lang.IllegalAccessException - if this Method object enforces Java
language access control and the underlying method is inaccessible
public static java.lang.Object InvokePublicMethodUnchecked(java.lang.Object target,
java.lang.String methodName,
java.lang.Object singleParam)
target - the object the underlying method is invoked frommethodName - name of the method to be invoked from the target objectsingleParam - input object
public static java.lang.Object InvokeGetMethod(java.lang.Object target,
java.lang.String fieldName)
target - the object the underlying method is invoked fromfieldName - field name to be retrieved
public static java.lang.String ToInitCase(java.lang.String txt)
txt - input String object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||