Package: org.codehaus.groovy.runtime.metaclass

## [Java] Class ReflectionMetaMethod

- org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod

-     public class ReflectionMetaMethod
      extends MetaMethod

  A MetaMethod implementation that wraps a reflection-based method call. This class provides access to a cached method and delegates method invocations to the underlying cached method.

  This implementation is for internal use by the Groovy runtime.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected CachedMethod` | `method` | The underlying cached method that this MetaMethod wraps

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class MetaMethod` | `EMPTY_ARRAY`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `ReflectionMetaMethod(CachedMethod method)` Constructs a new ReflectionMetaMethod.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public MetaMethod` | `getCachedMethod()` Returns the cached method wrapped by this MetaMethod.
    `` | `public CachedClass` | `getDeclaringClass()` Returns the class that declares the wrapped cached method.
    `` | `public int` | `getModifiers()` Returns the modifiers of the wrapped cached method.
    `` | `public String` | `getName()` Returns the name of the wrapped cached method.
    `` | `protected Class[]` | `getPT()`
    `` | `public Class` | `getReturnType()` Returns the return type of the wrapped cached method.
    `` | `public Object` | `invoke(Object object, Object[] arguments)` Invokes the wrapped cached method on the given object with the specified arguments.
    `` | `public String` | `toString()` Returns a string representation of the wrapped cached method.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class MetaMethod` | `checkParameters, clone, doMethodInvoke, equal, equal, getDeclaringClass, getDescriptor, getModifiers, getMopName, getName, getReturnType, getSignature, invoke, isAbstract, isCacheable, isDefault, isMethod, isSame, processDoMethodInvokeException, toString`
    `class ParameterTypes` | `coerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getPT, getParameterTypes, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, isVargsMethod, setParametersTypes`

- - ### Field Detail

    - #### protected final CachedMethod method

      The underlying cached method that this MetaMethod wraps

  - ### Constructor Detail

    - #### public ReflectionMetaMethod(CachedMethod method)

      Constructs a new ReflectionMetaMethod.

      Parameters:
        `method` - the cached method to wrap

  - ### Method Detail

    - #### public MetaMethod getCachedMethod()

      Returns the cached method wrapped by this MetaMethod.

      Returns:
        the cached method

    - #### public CachedClass getDeclaringClass()

      Returns the class that declares the wrapped cached method.

      Returns:
        the declaring class

    - #### public int getModifiers()

      Returns the modifiers of the wrapped cached method.

      Returns:
        the method modifiers

    - #### public String getName()

      Returns the name of the wrapped cached method.

      Returns:
        the method name

    - #### protected Class[] getPT()

    - #### public Class getReturnType()

      Returns the return type of the wrapped cached method.

      Returns:
        the return type

    - #### public Object invoke(Object object, Object[] arguments)

      Invokes the wrapped cached method on the given object with the specified arguments.

      Parameters:
        `object` - the object to invoke the method on
        `arguments` - the method arguments
      Returns:
        the method return value

    - #### public String toString()

      Returns a string representation of the wrapped cached method.

      Returns:
        the string representation