Package: org.codehaus.groovy.runtime.metaclass

## [Java] Class TransformMetaMethod

- org.codehaus.groovy.runtime.metaclass.TransformMetaMethod

-     public class TransformMetaMethod
      extends MetaMethod

  A MetaMethod implementation useful for implementing coercion based invocations. This method wraps another metamethod and allows for argument transformation or other custom handling during method invocation.

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

  - ### Constructor Summary

    Constructors
    Constructor and description
    `TransformMetaMethod(MetaMethod metaMethod)` Constructs a new TransformMetaMethod.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Object` | `doMethodInvoke(Object object, Object[] arguments)` Invokes the wrapped metamethod without argument coercion.
    `` | `public CachedClass` | `getDeclaringClass()` Returns the class that declares the wrapped metamethod.
    `` | `public int` | `getModifiers()` Returns the modifiers of the wrapped metamethod.
    `` | `public String` | `getName()` Returns the name of the wrapped metamethod.
    `` | `public Class` | `getReturnType()` Returns the return type of the wrapped metamethod.
    `` | `public Object` | `invoke(Object object, Object[] arguments)` Invokes the wrapped metamethod on the given object with the specified arguments.

  - ### 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`

- - ### Constructor Detail

    - #### public TransformMetaMethod(MetaMethod metaMethod)

      Constructs a new TransformMetaMethod.

      Parameters:
        `metaMethod` - the metamethod to wrap

  - ### Method Detail

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

      Invokes the wrapped metamethod without argument coercion. This method skips the default argument coercion performed by the parent invoke method.

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

    - #### public CachedClass getDeclaringClass()

      Returns the class that declares the wrapped metamethod.

      Returns:
        the declaring class

    - #### public int getModifiers()

      Returns the modifiers of the wrapped metamethod.

      Returns:
        the method modifiers

    - #### public String getName()

      Returns the name of the wrapped metamethod.

      Returns:
        the method name

    - #### public Class getReturnType()

      Returns the return type of the wrapped metamethod.

      Returns:
        the return type

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

      Invokes the wrapped metamethod 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