|
|||||
FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A MetaMethod that accepts a closure in the constructor which is invoked when the MetaMethod is called. The delegate of the closure is set to the instance that the MetaMethod is invoked on when called.
Field Summary | |
---|---|
Closure |
callable
|
CachedClass |
declaringClass
|
String |
name
|
Constructor Summary | |
ClosureMetaMethod(String name, Closure c)
|
|
ClosureMetaMethod(String name, Class declaringClass, Closure c)
|
Method Summary | |
---|---|
Closure |
getClosure()
Retrieves the closure that is invoked by this MetaMethod |
CachedClass |
getDeclaringClass()
|
int |
getModifiers()
|
String |
getName()
|
Class |
getReturnType()
|
Object |
invoke(Object object, def arguments)
|
Constructor Detail |
---|
public ClosureMetaMethod(String name, Closure c)
public ClosureMetaMethod(String name, Class declaringClass, Closure c)
Method Detail |
---|
public Closure getClosure()
public CachedClass getDeclaringClass()
public int getModifiers()
public String getName()
public Class getReturnType()
public Object invoke(Object object, def arguments)