Package org.codehaus.groovy.reflection
Class CachedMethod
- java.lang.Object
 - 
- org.codehaus.groovy.reflection.ParameterTypes
 - 
- groovy.lang.MetaMethod
 - 
- org.codehaus.groovy.reflection.CachedMethod
 
 
 
 
- 
- All Implemented Interfaces:
 java.lang.Cloneable,java.lang.Comparable
public class CachedMethod extends MetaMethod implements java.lang.Comparable
 
- 
- 
Field Summary
Fields Modifier and Type Field Description CachedClasscachedClassstatic CachedMethod[]EMPTY_ARRAY- 
Fields inherited from class org.codehaus.groovy.reflection.ParameterTypes
isVargsMethod, nativeParamTypes, parameterTypes 
 - 
 
- 
Constructor Summary
Constructors Constructor Description CachedMethod(java.lang.reflect.Method method)CachedMethod(CachedClass clazz, java.lang.reflect.Method method) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.lang.Object o)CallSitecreatePogoMetaMethodSite(CallSite site, MetaClassImpl metaClass, java.lang.Class[] params)CallSitecreatePojoMetaMethodSite(CallSite site, MetaClassImpl metaClass, java.lang.Class[] params)CallSitecreateStaticMetaMethodSite(CallSite site, MetaClassImpl metaClass, java.lang.Class[] params)booleanequals(java.lang.Object o)static CachedMethodfind(java.lang.reflect.Method method)java.lang.reflect.MethodgetCachedMethod()CachedClassgetDeclaringClass()Gets the class where this method is declaredjava.lang.StringgetDescriptor()Return a descriptor of this method based on the return type and parameters of this method.intgetModifiers()Returns the modifiers for this methodjava.lang.StringgetName()Returns the name of the method represented by this classintgetParamsCount()ParameterTypesgetParamTypes()protected java.lang.Class[]getPT()java.lang.ClassgetReturnType()Access the return type for this methodjava.lang.StringgetSignature()Returns the signature of this methodinthashCode()java.lang.Objectinvoke(java.lang.Object object, java.lang.Object[] arguments)Invoke this methodbooleanisStatic()Returns whether or not this method is static.java.lang.reflect.MethodsetAccessible()java.lang.StringtoString()Returns a string representation of this method- 
Methods inherited from class groovy.lang.MetaMethod
checkParameters, clone, doMethodInvoke, equal, equal, getMopName, isAbstract, isCacheable, isMethod, isPrivate, isProtected, isPublic, isSame, processDoMethodInvokeException 
- 
Methods inherited from class org.codehaus.groovy.reflection.ParameterTypes
coerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getParameterTypes, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, isVargsMethod, setParametersTypes 
 - 
 
 - 
 
- 
- 
Field Detail
- 
EMPTY_ARRAY
public static final CachedMethod[] EMPTY_ARRAY
 
- 
cachedClass
public final CachedClass cachedClass
 
 - 
 
- 
Constructor Detail
- 
CachedMethod
public CachedMethod(CachedClass clazz, java.lang.reflect.Method method)
 
- 
CachedMethod
public CachedMethod(java.lang.reflect.Method method)
 
 - 
 
- 
Method Detail
- 
find
public static CachedMethod find(java.lang.reflect.Method method)
 
- 
getPT
protected java.lang.Class[] getPT()
- Overrides:
 getPTin classParameterTypes
 
- 
getName
public java.lang.String getName()
Description copied from class:MetaMethodReturns the name of the method represented by this class- Specified by:
 getNamein classMetaMethod- Returns:
 - name of this method
 
 
- 
getDescriptor
public java.lang.String getDescriptor()
Description copied from class:MetaMethodReturn a descriptor of this method based on the return type and parameters of this method.- Overrides:
 getDescriptorin classMetaMethod
 
- 
getDeclaringClass
public CachedClass getDeclaringClass()
Description copied from class:MetaMethodGets the class where this method is declared- Specified by:
 getDeclaringClassin classMetaMethod- Returns:
 - class of this method
 
 
- 
invoke
public final java.lang.Object invoke(java.lang.Object object, java.lang.Object[] arguments)Description copied from class:MetaMethodInvoke this method- Specified by:
 invokein classMetaMethod- Parameters:
 object- The object this method should be invoked onarguments- The arguments for the method if applicable- Returns:
 - The return value of the invocation
 
 
- 
getParamTypes
public ParameterTypes getParamTypes()
 
- 
getReturnType
public java.lang.Class getReturnType()
Description copied from class:MetaMethodAccess the return type for this method- Specified by:
 getReturnTypein classMetaMethod- Returns:
 - the return type of this method
 
 
- 
getParamsCount
public int getParamsCount()
 
- 
getModifiers
public int getModifiers()
Description copied from class:MetaMethodReturns the modifiers for this method- Specified by:
 getModifiersin classMetaMethod- Returns:
 - modifiers as an int.
 
 
- 
getSignature
public java.lang.String getSignature()
Description copied from class:MetaMethodReturns the signature of this method- Overrides:
 getSignaturein classMetaMethod- Returns:
 - The signature of this method
 
 
- 
setAccessible
public final java.lang.reflect.Method setAccessible()
 
- 
isStatic
public boolean isStatic()
Description copied from class:MetaMethodReturns whether or not this method is static.- Overrides:
 isStaticin classMetaMethod- Returns:
 - true if this method is static
 
 
- 
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
 compareToin interfacejava.lang.Comparable
 
- 
equals
public boolean equals(java.lang.Object o)
- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
toString
public java.lang.String toString()
Description copied from class:MetaMethodReturns a string representation of this method- Overrides:
 toStringin classMetaMethod
 
- 
createPogoMetaMethodSite
public CallSite createPogoMetaMethodSite(CallSite site, MetaClassImpl metaClass, java.lang.Class[] params)
 
- 
createPojoMetaMethodSite
public CallSite createPojoMetaMethodSite(CallSite site, MetaClassImpl metaClass, java.lang.Class[] params)
 
- 
createStaticMetaMethodSite
public CallSite createStaticMetaMethodSite(CallSite site, MetaClassImpl metaClass, java.lang.Class[] params)
 
- 
getCachedMethod
public java.lang.reflect.Method getCachedMethod()
 
 - 
 
 -