public class ClosureMetaMethod extends MetaMethod implements ClosureInvokingMethod
isVargsMethod, nativeParamTypes, parameterTypes
Constructor and Description |
---|
ClosureMetaMethod(String name,
Class declaringClass,
Closure c,
CachedMethod doCall) |
ClosureMetaMethod(String name,
Closure c,
CachedMethod doCall) |
Modifier and Type | Method and Description |
---|---|
static ClosureMetaMethod |
copy(ClosureMetaMethod closureMethod) |
static List<MetaMethod> |
createMethodList(String name,
Class declaringClass,
Closure closure) |
Closure |
getClosure()
Retrieves the closure that is invoked by this MetaMethod
|
CachedClass |
getDeclaringClass()
Gets the class where this method is declared
|
CachedMethod |
getDoCall() |
int |
getModifiers()
Returns the modifiers for this method
|
String |
getName()
Returns the name of the method represented by this class
|
Class |
getReturnType()
Access the return type for this method
|
Object |
invoke(Object object,
Object[] arguments)
Invoke this method
|
checkParameters, clone, doMethodInvoke, equal, equal, getDescriptor, getMopName, getSignature, isAbstract, isCacheable, isMethod, isPrivate, isProtected, isPublic, isSame, isStatic, processDoMethodInvokeException, toString
coerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getParameterTypes, getPT, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, isVargsMethod, setParametersTypes
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isStatic
public ClosureMetaMethod(String name, Closure c, CachedMethod doCall)
public ClosureMetaMethod(String name, Class declaringClass, Closure c, CachedMethod doCall)
public int getModifiers()
MetaMethod
getModifiers
in class MetaMethod
public String getName()
MetaMethod
getName
in interface ClosureInvokingMethod
getName
in class MetaMethod
public Class getReturnType()
MetaMethod
getReturnType
in class MetaMethod
public CachedClass getDeclaringClass()
MetaMethod
getDeclaringClass
in class MetaMethod
public Object invoke(Object object, Object[] arguments)
MetaMethod
invoke
in class MetaMethod
object
- The object this method should be invoked onarguments
- The arguments for the method if applicablepublic Closure getClosure()
getClosure
in interface ClosureInvokingMethod
public static List<MetaMethod> createMethodList(String name, Class declaringClass, Closure closure)
public CachedMethod getDoCall()
public static ClosureMetaMethod copy(ClosureMetaMethod closureMethod)