Class DefaultMethodKey

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

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

    • DefaultMethodKey

      public DefaultMethodKey(Class sender, String name, Class[] parameterTypes, boolean isCallToSuper)
      Constructs a method key with the specified parameters.
      Parameters:
      sender - the sender class
      name - the method name
      parameterTypes - the class types of the parameters
      isCallToSuper - whether this is a super method call
  • 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