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_ARRAYFields 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 SummaryModifier and Type Method Description booleancanAccessLegally(java.lang.Class<?> callerClass)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)<T extends java.lang.annotation.Annotation>
 TgetAnnotation(java.lang.Class<T> annotationClass)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()java.lang.Class[]getPT()java.lang.ClassgetReturnType()Access the return type for this methodjava.lang.StringgetSignature()Returns the signature of this methodCachedMethodgetTransformedMethod()inthashCode()java.lang.Objectinvoke(java.lang.Object object, java.lang.Object[] arguments)Invoke this methodbooleanisStatic()Returns whether or not this method is static.booleanisSynthetic()java.lang.reflect.MethodsetAccessible()voidsetTransformedMethod(CachedMethod transformedMethod)java.lang.StringtoString()Returns a string representation of this methodMethods inherited from class groovy.lang.MetaMethodcheckParameters, clone, doMethodInvoke, equal, equal, getMopName, isAbstract, isCacheable, isMethod, isPrivate, isProtected, isPublic, isSame, processDoMethodInvokeExceptionMethods inherited from class org.codehaus.groovy.reflection.ParameterTypescoerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getParameterTypes, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, isVargsMethod, setParametersTypesMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, wait
- 
Field Details- 
EMPTY_ARRAY
- 
cachedClass
 
- 
- 
Constructor Details- 
CachedMethod
- 
CachedMethodpublic CachedMethod(java.lang.reflect.Method method)
 
- 
- 
Method Details- 
find
- 
getPTpublic 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
 
- 
getDeclaringClassDescription 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
 
- 
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
 
- 
getTransformedMethod
- 
setTransformedMethod
- 
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)
- 
getAnnotationpublic <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
- 
isSyntheticpublic boolean isSynthetic()
- 
getCachedMethodpublic java.lang.reflect.Method getCachedMethod()
- 
canAccessLegallypublic boolean canAccessLegally(java.lang.Class<?> callerClass)
 
-