public abstract class MethodAccess extends Object
| 构造器和说明 |
|---|
MethodAccess() |
| 限定符和类型 | 方法和说明 |
|---|---|
static MethodAccess |
get(Class type)
Creates a new MethodAccess for the specified type.
|
static MethodAccess |
get(Class type,
List<Method> methods) |
int |
getIndex(String methodName)
Returns the index of the first method with the specified name.
|
int |
getIndex(String methodName,
Class... paramTypes)
Returns the index of the first method with the specified name and param types.
|
int |
getIndex(String methodName,
int paramsCount)
Returns the index of the first method with the specified name and the specified number of arguments.
|
String[] |
getMethodNames() |
Class[][] |
getParameterTypes() |
Class[] |
getReturnTypes() |
abstract Object |
invoke(Object object,
int methodIndex,
Object... args) |
Object |
invoke(Object object,
Method method,
Class[] paramTypes,
Object... args)
Invokes the method with the specified method and the specified param types.
|
Object |
invoke(Object object,
String methodName,
Class[] paramTypes,
Object... args)
Invokes the method with the specified name and the specified param types.
|
Object |
invoke(Object object,
String methodName,
Object... args)
Invokes the first method with the specified name and the specified number of arguments.
|
Object |
invokeWithCache(Object object,
String methodName,
Object... args) |
public Object invoke(Object object, String methodName, Class[] paramTypes, Object... args)
public Object invoke(Object object, Method method, Class[] paramTypes, Object... args)
public Object invoke(Object object, String methodName, Object... args)
public int getIndex(String methodName)
public int getIndex(String methodName, Class... paramTypes)
public int getIndex(String methodName, int paramsCount)
public String[] getMethodNames()
public Class[][] getParameterTypes()
public Class[] getReturnTypes()
public static MethodAccess get(Class type, List<Method> methods)
public static MethodAccess get(Class type)
type - Must not be the Object class, a primitive type, or void.Copyright © 2022. All rights reserved.