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:
- Cloneable,- Comparable
 
 public class CachedMethod extends MetaMethod implements 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(Method method)CachedMethod(CachedClass clazz, Method method)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanAccessLegally(Class<?> callerClass)intcompareTo(Object o)CallSitecreatePogoMetaMethodSite(CallSite site, MetaClassImpl metaClass, Class[] params)CallSitecreatePojoMetaMethodSite(CallSite site, MetaClassImpl metaClass, Class[] params)CallSitecreateStaticMetaMethodSite(CallSite site, MetaClassImpl metaClass, Class[] params)booleanequals(Object o)static CachedMethodfind(Method method)<T extends Annotation>
 TgetAnnotation(Class<T> annotationClass)MethodgetCachedMethod()CachedClassgetDeclaringClass()Gets the class where this method is declaredStringgetDescriptor()Return a descriptor of this method based on the return type and parameters of this method.intgetModifiers()Returns the modifiers for this methodStringgetName()Returns the name of the method represented by this classintgetParamsCount()ParameterTypesgetParamTypes()Class[]getPT()ClassgetReturnType()Access the return type for this methodStringgetSignature()Returns the signature of this methodCachedMethodgetTransformedMethod()inthashCode()Objectinvoke(Object object, Object[] arguments)Invoke this methodbooleanisStatic()Returns whether or not this method is static.booleanisSynthetic()MethodsetAccessible()voidsetTransformedMethod(CachedMethod transformedMethod)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, Method method) 
 - 
CachedMethodpublic CachedMethod(Method method) 
 
- 
 - 
Method Detail- 
findpublic static CachedMethod find(Method method) 
 - 
getPTpublic Class[] getPT() - Overrides:
- getPTin class- ParameterTypes
 
 - 
getNamepublic 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 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 Object invoke(Object object, 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 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 String getSignature() Description copied from class:MetaMethodReturns the signature of this method- Overrides:
- getSignaturein class- MetaMethod
- Returns:
- The signature of this method
 
 - 
setAccessiblepublic final 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
 
 - 
getTransformedMethodpublic CachedMethod getTransformedMethod() 
 - 
setTransformedMethodpublic void setTransformedMethod(CachedMethod transformedMethod) 
 - 
compareTopublic int compareTo(Object o) - Specified by:
- compareToin interface- Comparable
 
 - 
toStringpublic String toString() Description copied from class:MetaMethodReturns a string representation of this method- Overrides:
- toStringin class- MetaMethod
 
 - 
createPogoMetaMethodSitepublic CallSite createPogoMetaMethodSite(CallSite site, MetaClassImpl metaClass, Class[] params) 
 - 
createPojoMetaMethodSitepublic CallSite createPojoMetaMethodSite(CallSite site, MetaClassImpl metaClass, Class[] params) 
 - 
createStaticMetaMethodSitepublic CallSite createStaticMetaMethodSite(CallSite site, MetaClassImpl metaClass, Class[] params) 
 - 
getAnnotationpublic <T extends Annotation> T getAnnotation(Class<T> annotationClass) 
 - 
isSyntheticpublic boolean isSynthetic() 
 - 
getCachedMethodpublic Method getCachedMethod() 
 - 
canAccessLegallypublic boolean canAccessLegally(Class<?> callerClass) 
 
- 
 
-