|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.anthonyeden.lib.util.MethodUtilities
Utilities for invoking methods at runtime using reflection.
Method Summary | |
static java.lang.reflect.Method |
getDeclaredMethod(java.lang.Class targetClass,
java.lang.String name,
java.lang.Class paramClass)
Get the declared method with the given name and with a single argument of the type specified by paramClass. |
static java.lang.reflect.Method |
getDeclaredMethod(java.lang.Class targetClass,
java.lang.String name,
java.lang.Class[] paramClasses)
Get the declared method with the given name and with arguments of the types specified by paramClasses. |
static java.lang.reflect.Method |
getMethod(java.lang.Class targetClass,
java.lang.String name,
java.lang.Class paramClass)
Get the method with the given name and with a single argument of the type specified by paramClass. |
static java.lang.reflect.Method |
getMethod(java.lang.Class targetClass,
java.lang.String name,
java.lang.Class[] paramClasses)
Get the method with the given name and with arguments of the types specified by paramClasses. |
static java.lang.Object |
invoke(java.lang.reflect.Method method,
java.lang.Object target,
java.lang.Object arg)
Invoke the given method. |
static java.lang.Object |
invoke(java.lang.reflect.Method method,
java.lang.Object target,
java.lang.Object[] args)
Invoke the given method. |
static java.lang.Object |
invoke(java.lang.String methodName,
java.lang.Object target,
java.lang.Class targetClass,
java.lang.Object arg)
Invoke the given method. |
static java.lang.Object |
invoke(java.lang.String methodName,
java.lang.Object target,
java.lang.Class targetClass,
java.lang.Object[] args)
Invoke the given method. |
static java.lang.Object |
invoke(java.lang.String methodName,
java.lang.Object target,
java.lang.Object arg)
Invoke the given method. |
static java.lang.Object |
invoke(java.lang.String methodName,
java.lang.Object target,
java.lang.Object[] args)
Invoke the given method. |
static java.lang.Object |
invokeDeclared(java.lang.String methodName,
java.lang.Object target,
java.lang.Object arg)
Invoke the given method. |
static java.lang.Object |
invokeDeclared(java.lang.String methodName,
java.lang.Object target,
java.lang.Object[] args)
Invoke the given method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.Object invoke(java.lang.reflect.Method method, java.lang.Object target, java.lang.Object arg) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
method
- The methodtarget
- The target Objectarg
- A single argument
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
public static java.lang.Object invoke(java.lang.reflect.Method method, java.lang.Object target, java.lang.Object[] args) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
method
- The Methodtarget
- The target Objectargs
- An array of argument Objects
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
public static java.lang.Object invoke(java.lang.String methodName, java.lang.Object target, java.lang.Object arg) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.SecurityException
methodName
- The method nametarget
- The target Objectarg
- A single argument
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.SecurityException
public static java.lang.Object invoke(java.lang.String methodName, java.lang.Object target, java.lang.Object[] args) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.SecurityException
methodName
- The Method nametarget
- The target Objectargs
- An array of argument Objects
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.SecurityException
public static java.lang.Object invoke(java.lang.String methodName, java.lang.Object target, java.lang.Class targetClass, java.lang.Object[] args) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.SecurityException
methodName
- The method nametarget
- The target ObjecttargetClass
- The Class of the target objectargs
- An array of argument Objects
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.SecurityException
public static java.lang.Object invoke(java.lang.String methodName, java.lang.Object target, java.lang.Class targetClass, java.lang.Object arg) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.SecurityException
methodName
- The method nametarget
- The target ObjecttargetClass
- The Class of the target objectarg
- A single argument
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.SecurityException
public static java.lang.Object invokeDeclared(java.lang.String methodName, java.lang.Object target, java.lang.Object arg) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.SecurityException
methodName
- The method nametarget
- The target Objectarg
- A single argument
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.SecurityException
public static java.lang.Object invokeDeclared(java.lang.String methodName, java.lang.Object target, java.lang.Object[] args) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.SecurityException
methodName
- The method nametarget
- The target Objectargs
- An array of arguments
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.SecurityException
public static java.lang.reflect.Method getMethod(java.lang.Class targetClass, java.lang.String name, java.lang.Class paramClass) throws java.lang.NoSuchMethodException, java.lang.SecurityException
targetClass
- The target classname
- The method nameparamClass
- The single parameter class (may be null)
java.lang.SecurityException
java.lang.NoSuchMethodException
public static java.lang.reflect.Method getMethod(java.lang.Class targetClass, java.lang.String name, java.lang.Class[] paramClasses) throws java.lang.NoSuchMethodException, java.lang.SecurityException
targetClass
- The target classname
- The method nameparamClasses
- An array of parameter classes
java.lang.SecurityException
java.lang.NoSuchMethodException
public static java.lang.reflect.Method getDeclaredMethod(java.lang.Class targetClass, java.lang.String name, java.lang.Class paramClass) throws java.lang.NoSuchMethodException, java.lang.SecurityException
targetClass
- The target classname
- The method nameparamClass
- The single parameter class (may be null)
java.lang.SecurityException
java.lang.NoSuchMethodException
public static java.lang.reflect.Method getDeclaredMethod(java.lang.Class targetClass, java.lang.String name, java.lang.Class[] paramClasses) throws java.lang.NoSuchMethodException, java.lang.SecurityException
targetClass
- The target classname
- The method nameparamClasses
- An array of parameter classes
java.lang.SecurityException
java.lang.NoSuchMethodException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |