Package org.codehaus.groovy.runtime.metaclass

# Class MixinInstanceMetaMethod

java.lang.Object
org.codehaus.groovy.reflection.ParameterTypes
groovy.lang.MetaMethod
org.codehaus.groovy.runtime.metaclass.MixinInstanceMetaMethod

All Implemented Interfaces:
  `MetaMember`, `Cloneable`

public class MixinInstanceMetaMethod extends MetaMethod
MetaMethod for mixed in classes. This method delegates to the underlying method on the mixin instance.

- ## Field Summary

  ### Fields inherited from class groovy.lang.MetaMethod

  `EMPTY_ARRAY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MixinInstanceMetaMethod(MetaMethod method, MixinInMetaClass mixinInMetaClass)`
  Constructs a new MixinInstanceMetaMethod.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CachedClass`
  `getDeclaringClass()`
  Returns the class that declares this mixin method.
  `int`
  `getModifiers()`
  Returns the modifiers of the underlying metamethod.
  `String`
  `getName()`
  Returns the name of the underlying metamethod.
  `protected Class[]`
  `getPT()`
  Protected method subclasses override to provide parameter types.
  `Class`
  `getReturnType()`
  Returns the return type of the underlying metamethod.
  `Object`
  `invoke(Object object, Object[] arguments)`
  Invokes the underlying method on the mixin instance associated with the given object.

  ### Methods inherited from class groovy.lang.MetaMethod

  `checkParameters, clone, doMethodInvoke, equal, equal, getDescriptor, getMopName, getSignature, isAbstract, isCacheable, isDefault, isMethod, isSame, processDoMethodInvokeException, toString`

  ### Methods inherited from class org.codehaus.groovy.reflection.ParameterTypes

  `coerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getParameterTypes, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, isVargsMethod, setParametersTypes`

  ### Methods inherited from class java.lang.Object

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

  ### Methods inherited from interface groovy.lang.MetaMember

  `isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isSynthetic`

- ## Constructor Details

  - ### MixinInstanceMetaMethod

    public MixinInstanceMetaMethod(MetaMethod method, MixinInMetaClass mixinInMetaClass)
    Constructs a new MixinInstanceMetaMethod.
    Parameters:
      `method` - the underlying metamethod from the mixin
      `mixinInMetaClass` - the mixin metadata

- ## Method Details

  - ### getModifiers

    public int getModifiers()
    Returns the modifiers of the underlying metamethod.
    Specified by:
      `getModifiers` in interface `MetaMember`
    Specified by:
      `getModifiers` in class `MetaMethod`
    Returns:
      the method modifiers

  - ### getName

    public String getName()
    Returns the name of the underlying metamethod.
    Specified by:
      `getName` in interface `MetaMember`
    Specified by:
      `getName` in class `MetaMethod`
    Returns:
      the method name

  - ### getReturnType

    public Class getReturnType()
    Returns the return type of the underlying metamethod.
    Specified by:
      `getReturnType` in class `MetaMethod`
    Returns:
      the return type

  - ### getDeclaringClass

    public CachedClass getDeclaringClass()
    Returns the class that declares this mixin method.
    Specified by:
      `getDeclaringClass` in class `MetaMethod`
    Returns:
      the declaring class (from the mixin)

  - ### invoke

    public Object invoke(Object object, Object[] arguments)
    Invokes the underlying method on the mixin instance associated with the given object.
    Specified by:
      `invoke` in class `MetaMethod`
    Parameters:
      `object` - the object to invoke the method on
      `arguments` - the method arguments
    Returns:
      the method return value

  - ### getPT

    protected Class[] getPT()
    Description copied from class: `ParameterTypes`
    Protected method subclasses override to provide parameter types. Default implementation throws `UnsupportedOperationException`.
    Overrides:
      `getPT` in class `ParameterTypes`
    Returns:
      the native parameter class array