# Class MethodAccess

java.lang.Object
com.esotericsoftware.reflectasm.MethodAccess

public abstract class MethodAccess extends Object

## Constructor Summary

Constructors
Constructor
Description
`MethodAccess()`

## Method Summary

Modifier and Type
Method
Description
`static MethodAccess`
`get(Class type)`
Creates a new MethodAccess for the specified 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.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MethodAccess

public MethodAccess()

## Method Details

### invoke

public abstract Object invoke(Object object, int methodIndex, Object... args)

### 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)
Creates a new MethodAccess for the specified type.

Parameters:
  `type` - Must not be a primitive type, or void.