public abstract class MethodAccess
extends java.lang.Object
| 构造器和说明 |
|---|
MethodAccess() |
| 限定符和类型 | 方法和说明 |
|---|---|
static MethodAccess |
get(java.lang.Class<?> type) |
int |
getIndex(java.lang.String methodName)
Returns the index of the first method with the specified name.
|
int |
getIndex(java.lang.String methodName,
java.lang.Class<?>... paramTypes)
Returns the index of the first method with the specified name and param
types.
|
int |
getIndex(java.lang.String methodName,
int paramsCount)
Returns the index of the first method with the specified name and the
specified number of arguments.
|
java.lang.String[] |
getMethodNames() |
java.lang.Class<?>[][] |
getParameterTypes() |
java.lang.Class<?>[] |
getReturnTypes() |
abstract java.lang.Object |
invoke(java.lang.Object object,
int methodIndex,
java.lang.Object... args) |
java.lang.Object |
invoke(java.lang.Object object,
java.lang.String methodName,
java.lang.Class<?>[] paramTypes,
java.lang.Object... args)
Invokes the method with the specified name and the specified param types.
|
java.lang.Object |
invoke(java.lang.Object object,
java.lang.String methodName,
java.lang.Object... args)
Invokes the first method with the specified name and the specified number
of arguments.
|
public abstract java.lang.Object invoke(java.lang.Object object,
int methodIndex,
java.lang.Object... args)
public java.lang.Object invoke(java.lang.Object object,
java.lang.String methodName,
java.lang.Class<?>[] paramTypes,
java.lang.Object... args)
object - 宿主对象methodName - 方法名称paramTypes - 参数类型args - 参数列表public java.lang.Object invoke(java.lang.Object object,
java.lang.String methodName,
java.lang.Object... args)
object - 宿主对象methodName - 方法名称args - 参数列表public int getIndex(java.lang.String methodName)
methodName - 方法名称public int getIndex(java.lang.String methodName,
java.lang.Class<?>... paramTypes)
methodName - 方法名称paramTypes - 参数类型public int getIndex(java.lang.String methodName,
int paramsCount)
methodName - 方法名称paramsCount - 参数个数public java.lang.String[] getMethodNames()
public java.lang.Class<?>[][] getParameterTypes()
public java.lang.Class<?>[] getReturnTypes()
public static MethodAccess get(java.lang.Class<?> type)