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:
MetaMember
,Cloneable
,Comparable
-
Field Summary
Fields inherited from class org.codehaus.groovy.reflection.ParameterTypes
isVargsMethod, nativeParamTypes, parameterTypes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canAccessLegally
(Class<?> callerClass) int
createPogoMetaMethodSite
(CallSite site, MetaClassImpl metaClass, Class[] params) createPojoMetaMethodSite
(CallSite site, MetaClassImpl metaClass, Class[] params) createStaticMetaMethodSite
(CallSite site, MetaClassImpl metaClass, Class[] params) boolean
static CachedMethod
<T extends Annotation>
TgetAnnotation
(Class<T> annotationClass) Gets the class where this method is declared.Returns a descriptor of this method based on the return type and parameters of this method.int
Returns the modifiers of this method.getName()
Returns the name of this method.int
Class[]
getPT()
Returns the return type for this method.Returns the signature of this method.int
hashCode()
final Object
Invokes this method.boolean
final Method
void
setTransformedMethod
(CachedMethod transformedMethod) toString()
Methods inherited from class groovy.lang.MetaMethod
checkParameters, clone, doMethodInvoke, equal, equal, getMopName, isAbstract, isCacheable, isDefault, isMethod, isSame, processDoMethodInvokeException
Methods inherited from class org.codehaus.groovy.reflection.ParameterTypes
coerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getParameterTypes, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, isVargsMethod, setParametersTypes
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface groovy.lang.MetaMember
isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
-
Field Details
-
EMPTY_ARRAY
-
cachedClass
-
-
Constructor Details
-
CachedMethod
-
CachedMethod
-
-
Method Details
-
find
-
compareTo
- Specified by:
compareTo
in interfaceComparable
-
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toString
in classMetaMethod
-
canAccessLegally
-
getAnnotation
-
getCachedMethod
-
getDeclaringClass
Description copied from class:MetaMethod
Gets the class where this method is declared.- Specified by:
getDeclaringClass
in classMetaMethod
- Returns:
- class of this method
-
getDescriptor
Description copied from class:MetaMethod
Returns a descriptor of this method based on the return type and parameters of this method.- Overrides:
getDescriptor
in classMetaMethod
-
getModifiers
public int getModifiers()Description copied from class:MetaMethod
Returns the modifiers of this method.- Specified by:
getModifiers
in interfaceMetaMember
- Specified by:
getModifiers
in classMetaMethod
- Returns:
- modifiers as an int.
-
getName
Description copied from class:MetaMethod
Returns the name of this method.- Specified by:
getName
in interfaceMetaMember
- Specified by:
getName
in classMetaMethod
- Returns:
- name of this method
-
getParamsCount
public int getParamsCount() -
getParamTypes
-
getPT
- Overrides:
getPT
in classParameterTypes
-
getReturnType
Description copied from class:MetaMethod
Returns the return type for this method.- Specified by:
getReturnType
in classMetaMethod
- Returns:
- the return type of this method
-
getSignature
Description copied from class:MetaMethod
Returns the signature of this method.- Overrides:
getSignature
in classMetaMethod
- Returns:
- The signature of this method
-
isSynthetic
public boolean isSynthetic()- Specified by:
isSynthetic
in interfaceMetaMember
-
getTransformedMethod
-
setTransformedMethod
-
createPogoMetaMethodSite
-
createPojoMetaMethodSite
-
createStaticMetaMethodSite
-
invoke
Description copied from class:MetaMethod
Invokes this method.- Specified by:
invoke
in 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
-
setAccessible
-