Package groovy.lang
Class MetaMethod
java.lang.Object
org.codehaus.groovy.reflection.ParameterTypes
groovy.lang.MetaMethod
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
CachedMethod,CallSiteAwareMetaMethod,ClosureMetaMethod,ClosureStaticMetaMethod,GeneratedMetaMethod,MixinInstanceMetaMethod,ReflectionMetaMethod,TransformMetaMethod
Represents a Method on a Java object a little like
Method
except without using reflection to invoke the method- Version:
- $Revision$
- Author:
- James Strachan, Alex Tkachman
-
Field Summary
Fields inherited from class org.codehaus.groovy.reflection.ParameterTypes
isVargsMethod, nativeParamTypes, parameterTypes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckParameters(Class[] arguments) Checks that the given parameters are valid to call this methodclone()doMethodInvoke(Object object, Object[] argumentArray) protected static booleanequal(CachedClass[] a, Class[] b) protected static booleanequal(CachedClass[] a, CachedClass[] b) abstract CachedClassabstract intabstract StringgetName()abstract Classabstract ObjectbooleanbooleanbooleanisMethod(MetaMethod method) final booleanfinal booleanfinal booleanisPublic()final booleanisSame(MetaMethod method) booleanisStatic()final RuntimeExceptionprocessDoMethodInvokeException(Exception e, Object object, Object[] argumentArray) toString()Methods inherited from class org.codehaus.groovy.reflection.ParameterTypes
coerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getParameterTypes, getPT, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, setParametersTypes
-
Constructor Details
-
MetaMethod
public MetaMethod() -
MetaMethod
-
-
Method Details
-
getModifiers
public abstract int getModifiers() -
getName
-
getReturnType
-
getDeclaringClass
-
invoke
-
checkParameters
Checks that the given parameters are valid to call this method- Parameters:
arguments- the arguments to check- Throws:
IllegalArgumentException- if the parameters are not valid
-
isMethod
-
equal
-
equal
-
toString
-
clone
-
isStatic
public boolean isStatic() -
isAbstract
public boolean isAbstract() -
isPrivate
public final boolean isPrivate() -
isProtected
public final boolean isProtected() -
isPublic
public final boolean isPublic() -
isSame
- Parameters:
method- the method to compare against- Returns:
- true if the given method has the same name, parameters, return type and modifiers but may be defined on another type
-
isCacheable
public boolean isCacheable() -
getDescriptor
-
getSignature
-
getMopName
-
processDoMethodInvokeException
public final RuntimeException processDoMethodInvokeException(Exception e, Object object, Object[] argumentArray) -
doMethodInvoke
-