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 SummaryFields Modifier and Type Field Description CachedClasscachedClassstatic CachedMethod[]EMPTY_ARRAY- 
Fields inherited from class org.codehaus.groovy.reflection.ParameterTypesisVargsMethod, nativeParamTypes, parameterTypes
 
- 
 - 
Constructor SummaryConstructors Constructor Description CachedMethod(java.lang.reflect.Method method)CachedMethod(CachedClass clazz, java.lang.reflect.Method method)
 - 
Method SummaryAll 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.MetaMethodcheckParameters, clone, doMethodInvoke, equal, equal, getMopName, isAbstract, isCacheable, isMethod, isPrivate, isProtected, isPublic, isSame, processDoMethodInvokeException
 - 
Methods inherited from class org.codehaus.groovy.reflection.ParameterTypescoerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getParameterTypes, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, isVargsMethod, setParametersTypes
 
- 
 
- 
- 
- 
Field Detail- 
EMPTY_ARRAYpublic static final CachedMethod[] EMPTY_ARRAY 
 - 
cachedClasspublic final CachedClass cachedClass 
 
- 
 - 
Constructor Detail- 
CachedMethodpublic CachedMethod(CachedClass clazz, java.lang.reflect.Method method) 
 - 
CachedMethodpublic CachedMethod(java.lang.reflect.Method method) 
 
- 
 - 
Method Detail- 
findpublic static CachedMethod find(java.lang.reflect.Method method) 
 - 
getPTprotected java.lang.Class[] getPT() - Overrides:
- getPTin class- ParameterTypes
 
 - 
getNamepublic java.lang.String getName() Description copied from class:MetaMethodReturns the name of the method represented by this class- Specified by:
- getNamein class- MetaMethod
- Returns:
- name of this method
 
 - 
getDescriptorpublic 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 class- MetaMethod
 
 - 
getDeclaringClasspublic CachedClass getDeclaringClass() Description copied from class:MetaMethodGets the class where this method is declared- Specified by:
- getDeclaringClassin class- MetaMethod
- Returns:
- class of this method
 
 - 
invokepublic final java.lang.Object invoke(java.lang.Object object, java.lang.Object[] arguments)Description copied from class:MetaMethodInvoke this method- Specified by:
- invokein class- MetaMethod
- Parameters:
- object- The object this method should be invoked on
- arguments- The arguments for the method if applicable
- Returns:
- The return value of the invocation
 
 - 
getParamTypespublic ParameterTypes getParamTypes() 
 - 
getReturnTypepublic java.lang.Class getReturnType() Description copied from class:MetaMethodAccess the return type for this method- Specified by:
- getReturnTypein class- MetaMethod
- Returns:
- the return type of this method
 
 - 
getParamsCountpublic int getParamsCount() 
 - 
getModifierspublic int getModifiers() Description copied from class:MetaMethodReturns the modifiers for this method- Specified by:
- getModifiersin class- MetaMethod
- Returns:
- modifiers as an int.
 
 - 
getSignaturepublic java.lang.String getSignature() Description copied from class:MetaMethodReturns the signature of this method- Overrides:
- getSignaturein class- MetaMethod
- Returns:
- The signature of this method
 
 - 
setAccessiblepublic final java.lang.reflect.Method setAccessible() 
 - 
isStaticpublic boolean isStatic() Description copied from class:MetaMethodReturns whether or not this method is static.- Overrides:
- isStaticin class- MetaMethod
- Returns:
- true if this method is static
 
 - 
compareTopublic int compareTo(java.lang.Object o) - Specified by:
- compareToin interface- java.lang.Comparable
 
 - 
equalspublic boolean equals(java.lang.Object o) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() Description copied from class:MetaMethodReturns a string representation of this method- Overrides:
- toStringin class- MetaMethod
 
 - 
createPogoMetaMethodSitepublic CallSite createPogoMetaMethodSite(CallSite site, MetaClassImpl metaClass, java.lang.Class[] params) 
 - 
createPojoMetaMethodSitepublic CallSite createPojoMetaMethodSite(CallSite site, MetaClassImpl metaClass, java.lang.Class[] params) 
 - 
createStaticMetaMethodSitepublic CallSite createStaticMetaMethodSite(CallSite site, MetaClassImpl metaClass, java.lang.Class[] params) 
 - 
getCachedMethodpublic java.lang.reflect.Method getCachedMethod() 
 
- 
 
-