Package: org.codehaus.groovy.runtime.metaclass

## [Java] Class TemporaryMethodKey

- org.codehaus.groovy.runtime.metaclass.TemporaryMethodKey

-     public class TemporaryMethodKey
      extends MethodKey

  A temporary implementation of MethodKey used to perform a fast lookup for a method using a set of arguments to a method

- - ### Constructor Summary

    Constructors
    Constructor and description
    `TemporaryMethodKey(Class sender, String name, Object[] parameterValues, boolean isCallToSuper)` Constructs a new TemporaryMethodKey.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public int` | `getParameterCount()` Returns the number of parameters for this method key.
    `` | `public Class` | `getParameterType(int index)` Gets the class type of the parameter at the specified index.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class MethodKey` | `createCopy, createHashCode, equals, equals, getName, getParameterCount, getParameterType, getParamterTypes, hashCode, toString`

- - ### Constructor Detail

    - #### public TemporaryMethodKey(Class sender, String name, Object[] parameterValues, boolean isCallToSuper)

      Constructs a new TemporaryMethodKey.

      Parameters:
        `sender` - the class making the method call
        `name` - the method name
        `parameterValues` - the actual parameter values (used to determine types)
        `isCallToSuper` - true if this is a call to a super method

  - ### Method Detail

    - #### public int getParameterCount()

      Returns the number of parameters for this method key.

      Returns:
        the number of parameter values

    - #### public Class getParameterType(int index)

      Gets the class type of the parameter at the specified index. If the parameter value is a Class object, returns it directly. Otherwise, returns the class of the parameter value. If the parameter is null, returns Object.class.

      Parameters:
        `index` - the parameter index
      Returns:
        the class type of the parameter