Package com.esotericsoftware.reflectasm
Class MethodAccess
- java.lang.Object
-
- com.esotericsoftware.reflectasm.MethodAccess
-
public abstract class MethodAccess extends Object
-
-
Constructor Summary
Constructors Constructor Description MethodAccess()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static MethodAccess
get(Class type)
int
getIndex(String methodName)
Returns the index of the first method with the specified name.int
getIndex(String methodName, int paramsCount)
Returns the index of the first method with the specified name and the specified number of arguments.int
getIndex(String methodName, Class... paramTypes)
Returns the index of the first method with the specified name and param types.String[]
getMethodNames()
Class[][]
getParameterTypes()
Class[]
getReturnTypes()
abstract Object
invoke(Object object, int methodIndex, Object... args)
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.
-
-
-
Method Detail
-
invoke
public Object invoke(Object object, String methodName, Class[] paramTypes, Object... args)
Invokes the method with the specified name and the specified param types.
-
invoke
public Object invoke(Object object, String methodName, Object... args)
Invokes the first method with the specified name and the specified number of arguments.
-
getIndex
public int getIndex(String methodName)
Returns the index of the first method with the specified name.
-
getIndex
public int getIndex(String methodName, Class... paramTypes)
Returns the index of the first method with the specified name and param types.
-
getIndex
public int getIndex(String methodName, int paramsCount)
Returns the index of the first method with the specified name and the specified number of arguments.
-
getMethodNames
public String[] getMethodNames()
-
getParameterTypes
public Class[][] getParameterTypes()
-
getReturnTypes
public Class[] getReturnTypes()
-
get
public static MethodAccess get(Class type)
-
-