Package org.codehaus.groovy.runtime.metaclass

# Class TemporaryMethodKey

java.lang.Object
org.codehaus.groovy.runtime.MethodKey
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
  Description
  `TemporaryMethodKey(Class sender, String name, Object[] parameterValues, boolean isCallToSuper)`
  Constructs a new TemporaryMethodKey.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getParameterCount()`
  Returns the number of parameters for this method key.
  `Class`
  `getParameterType(int index)`
  Gets the class type of the parameter at the specified index.

  ### Methods inherited from class org.codehaus.groovy.runtime.MethodKey

  `createCopy, createHashCode, equals, equals, getName, getParamterTypes, hashCode, toString`

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

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

- ## Constructor Details

  - ### TemporaryMethodKey

    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 Details

  - ### getParameterCount

    public int getParameterCount()
    Returns the number of parameters for this method key.
    Specified by:
      `getParameterCount` in class `MethodKey`
    Returns:
      the number of parameter values

  - ### getParameterType

    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.
    Specified by:
      `getParameterType` in class `MethodKey`
    Parameters:
      `index` - the parameter index
    Returns:
      the class type of the parameter