Package org.codehaus.groovy.runtime
Class GroovyCategorySupport.CategoryMethod
java.lang.Object
org.codehaus.groovy.reflection.ParameterTypes
groovy.lang.MetaMethod
org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod
org.codehaus.groovy.runtime.metaclass.NewMetaMethod
org.codehaus.groovy.runtime.metaclass.NewInstanceMetaMethod
org.codehaus.groovy.runtime.GroovyCategorySupport.CategoryMethod
- All Implemented Interfaces:
MetaMember,Cloneable,Comparable
- Enclosing class:
- GroovyCategorySupport
public static class GroovyCategorySupport.CategoryMethod
extends NewInstanceMetaMethod
implements Comparable
A public static category method seen as an instance method of
its first parameter type. Ordering places a more specific receiver
type ahead of a less specific one. The method is not cached,
because the active category set changes with the scope.
-
Field Summary
Fields inherited from class org.codehaus.groovy.runtime.metaclass.NewMetaMethod
bytecodeParameterTypes, EMPTY_TYPE_ARRAYFields inherited from class org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod
methodFields inherited from class groovy.lang.MetaMethod
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionCategoryMethod(CachedMethod metaMethod, Class metaClass) WrapsmetaMethodand recordsmetaClassas the receiver type used when category methods are ordered. -
Method Summary
Modifier and TypeMethodDescriptionintSort by most specific to least specific.booleanReturns whether this object is cacheable.Methods inherited from class org.codehaus.groovy.runtime.metaclass.NewInstanceMetaMethod
getModifiers, invoke, isStaticMethods inherited from class org.codehaus.groovy.runtime.metaclass.NewMetaMethod
getBytecodeParameterTypes, getDeclaringClass, getOwnerClassMethods inherited from class org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod
getCachedMethod, getName, getPT, getReturnType, toStringMethods inherited from class groovy.lang.MetaMethod
checkParameters, clone, doMethodInvoke, equal, equal, getDescriptor, getMopName, getSignature, isAbstract, isDefault, isMethod, isSame, processDoMethodInvokeExceptionMethods inherited from class org.codehaus.groovy.reflection.ParameterTypes
coerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getParameterTypes, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, isVargsMethod, setParametersTypesMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface groovy.lang.MetaMember
isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isSynthetic
-
Constructor Details
-
CategoryMethod
WrapsmetaMethodand recordsmetaClassas the receiver type used when category methods are ordered.- Parameters:
metaMethod- static category methodmetaClass- class of that method's first parameter, the receiver type
-
-
Method Details
-
isCacheable
public boolean isCacheable()Description copied from class:MetaMethodReturns whether this object is cacheable.- Overrides:
isCacheablein classMetaMethod
-
compareTo
Sort by most specific to least specific.- Specified by:
compareToin interfaceComparable- Parameters:
that- the object to compare against
-