CachedMethod (Groovy 2.4.16)
Date: 2018-12-09

org.codehaus.groovy.reflection

## Class CachedMethod

- java.lang.Object
- - org.codehaus.groovy.reflection.ParameterTypes
  - - groovy.lang.MetaMethod
    - - org.codehaus.groovy.reflection.CachedMethod

- All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Comparable

      public class CachedMethod
      extends MetaMethod
      implements java.lang.Comparable

  Author:
    Alex.Tkachman

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `CachedClass` | `cachedClass`

    - ### Fields inherited from class org.codehaus.groovy.reflection.ParameterTypes

      `isVargsMethod, nativeParamTypes, parameterTypes`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CachedMethod(CachedClass clazz, java.lang.reflect.Method method)`
    `CachedMethod(java.lang.reflect.Method method)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(java.lang.Object o)`
    `CallSite` | `createPogoMetaMethodSite(CallSite site, MetaClassImpl metaClass, java.lang.Class[] params)`
    `CallSite` | `createPojoMetaMethodSite(CallSite site, MetaClassImpl metaClass, java.lang.Class[] params)`
    `CallSite` | `createStaticMetaMethodSite(CallSite site, MetaClassImpl metaClass, java.lang.Class[] params)`
    `boolean` | `equals(java.lang.Object o)`
    `static CachedMethod` | `find(java.lang.reflect.Method method)`
    `java.lang.reflect.Method` | `getCachedMethod()`
    `CachedClass` | `getDeclaringClass()` Gets the class where this method is declared
    `java.lang.String` | `getDescriptor()` Return a descriptor of this method based on the return type and parameters of this method.
    `int` | `getModifiers()` Returns the modifiers for this method
    `java.lang.String` | `getName()` Returns the name of the method represented by this class
    `int` | `getParamsCount()`
    `ParameterTypes` | `getParamTypes()`
    `protected java.lang.Class[]` | `getPT()`
    `java.lang.Class` | `getReturnType()` Access the return type for this method
    `java.lang.String` | `getSignature()` Returns the signature of this method
    `int` | `hashCode()`
    `java.lang.Object` | `invoke(java.lang.Object object, java.lang.Object[] arguments)` Invoke this method
    `boolean` | `isStatic()` Returns whether or not this method is static.
    `java.lang.reflect.Method` | `setAccessible()`
    `java.lang.String` | `toString()` Returns a string representation of this method

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

      `checkParameters, clone, doMethodInvoke, equal, equal, getMopName, isAbstract, isCacheable, isMethod, isPrivate, isProtected, isPublic, isSame, processDoMethodInvokeException`

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

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### cachedClass

          public final CachedClass cachedClass

  - ### Constructor Detail

    - #### CachedMethod

          public CachedMethod(CachedClass clazz,
                              java.lang.reflect.Method method)

    - #### CachedMethod

          public CachedMethod(java.lang.reflect.Method method)

  - ### Method Detail

    - #### find

          public static CachedMethod find(java.lang.reflect.Method method)

    - #### getPT

          protected java.lang.Class[] getPT()

      Overrides:
        `getPT` in class `ParameterTypes`

    - #### getName

          public java.lang.String getName()

      Description copied from class: `MetaMethod`
      Returns the name of the method represented by this class
      Specified by:
        `getName` in class `MetaMethod`
      Returns:
        name of this method

    - #### getDescriptor

          public java.lang.String getDescriptor()

      Description copied from class: `MetaMethod`
      Return a descriptor of this method based on the return type and parameters of this method.
      Overrides:
        `getDescriptor` in class `MetaMethod`

    - #### getDeclaringClass

          public CachedClass getDeclaringClass()

      Description copied from class: `MetaMethod`
      Gets the class where this method is declared
      Specified by:
        `getDeclaringClass` in class `MetaMethod`
      Returns:
        class of this method

    - #### invoke

          public final java.lang.Object invoke(java.lang.Object object,
                                               java.lang.Object[] arguments)

      Description copied from class: `MetaMethod`
      Invoke this method
      Specified by:
        `invoke` in class `MetaMethod`
      Parameters:
        `object` - The object this method should be invoked on
        `arguments` - The arguments for the method if applicable
      Returns:
        The return value of the invocation

    - #### getParamTypes

          public ParameterTypes getParamTypes()

    - #### getReturnType

          public java.lang.Class getReturnType()

      Description copied from class: `MetaMethod`
      Access the return type for this method
      Specified by:
        `getReturnType` in class `MetaMethod`
      Returns:
        the return type of this method

    - #### getParamsCount

          public int getParamsCount()

    - #### getModifiers

          public int getModifiers()

      Description copied from class: `MetaMethod`
      Returns the modifiers for this method
      Specified by:
        `getModifiers` in class `MetaMethod`
      Returns:
        modifiers as an int.

    - #### getSignature

          public java.lang.String getSignature()

      Description copied from class: `MetaMethod`
      Returns the signature of this method
      Overrides:
        `getSignature` in class `MetaMethod`
      Returns:
        The signature of this method

    - #### setAccessible

          public final java.lang.reflect.Method setAccessible()

    - #### isStatic

          public boolean isStatic()

      Description copied from class: `MetaMethod`
      Returns whether or not this method is static.
      Overrides:
        `isStatic` in class `MetaMethod`
      Returns:
        true if this method is static

    - #### compareTo

          public int compareTo(java.lang.Object o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable`

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Description copied from class: `MetaMethod`
      Returns a string representation of this method
      Overrides:
        `toString` in class `MetaMethod`

    - #### createPogoMetaMethodSite

          public CallSite createPogoMetaMethodSite(CallSite site,
                                                   MetaClassImpl metaClass,
                                                   java.lang.Class[] params)

    - #### createPojoMetaMethodSite

          public CallSite createPojoMetaMethodSite(CallSite site,
                                                   MetaClassImpl metaClass,
                                                   java.lang.Class[] params)

    - #### createStaticMetaMethodSite

          public CallSite createStaticMetaMethodSite(CallSite site,
                                                     MetaClassImpl metaClass,
                                                     java.lang.Class[] params)

    - #### getCachedMethod

          public java.lang.reflect.Method getCachedMethod()