Package org.codehaus.groovy.runtime
Class DefaultCachedMethodKey
java.lang.Object
org.codehaus.groovy.runtime.MethodKey
org.codehaus.groovy.runtime.DefaultCachedMethodKey
A default implementation of MethodKey
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCachedMethodKey(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 tosuper. -
Method Summary
Modifier and TypeMethodDescriptionintReturns how many parameter types this key has.getParameterType(int index) Returns the parameter type atindex.Methods inherited from class org.codehaus.groovy.runtime.MethodKey
createCopy, createHashCode, equals, equals, getName, getParamterTypes, hashCode, toString
-
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 tosuper.- Parameters:
sender- the class that sends the callname- the method nameparameterTypes- the parameter types, stored as givenisCallToSuper- whether the call targets a super method
-
-
Method Details
-
getParameterCount
public int getParameterCount()Description copied from class:MethodKeyReturns how many parameter types this key has.- Specified by:
getParameterCountin classMethodKey- Returns:
- the parameter count
-
getParameterType
Description copied from class:MethodKeyReturns the parameter type atindex.MethodKey.equals(MethodKey)compares these classes by identity.- Specified by:
getParameterTypein classMethodKey- Parameters:
index- zero-based parameter index- Returns:
- the class at that index
-