Class DefaultCachedMethodKey

java.lang.Object
org.codehaus.groovy.runtime.MethodKey
org.codehaus.groovy.runtime.DefaultCachedMethodKey

public class DefaultCachedMethodKey extends MethodKey
A default implementation of MethodKey
  • Constructor Details

    • DefaultCachedMethodKey

      public DefaultCachedMethodKey(Class sender, String name, CachedClass[] parameterTypes, boolean isCallToSuper)
      Creates a key for a method identified by the sender, name, parameter types and whether the call is to super.
      Parameters:
      sender - the class that sends the call
      name - the method name
      parameterTypes - the parameter types, stored as given
      isCallToSuper - whether the call targets a super method
  • Method Details

    • getParameterCount

      public int getParameterCount()
      Description copied from class: MethodKey
      Returns how many parameter types this key has.
      Specified by:
      getParameterCount in class MethodKey
      Returns:
      the parameter count
    • getParameterType

      public Class getParameterType(int index)
      Description copied from class: MethodKey
      Returns the parameter type at index. MethodKey.equals(MethodKey) compares these classes by identity.
      Specified by:
      getParameterType in class MethodKey
      Parameters:
      index - zero-based parameter index
      Returns:
      the class at that index