|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.lang.GroovyObjectSupport
groovy.lang.Closure
Represents any closure object in Groovy.
Constructor Summary | |
Closure(Object delegate)
|
Method Summary | |
Closure |
asWritable()
|
Object |
call()
Invokes the closure without any parameters, returning any value if applicable. |
Object |
call(Object arguments)
Invokes the closure, returning any value if applicable. |
Object |
clone()
Allows the closure to be cloned |
Closure |
curry(Object arguments)
Support for closure currying |
Object |
getDelegate()
|
protected MetaMethod |
getDoCallMethod()
|
protected static Object[] |
getParameters(Object arguments)
|
Class[] |
getParameterTypes()
|
Object |
getProperty(String property)
|
Object |
invokeMethod(String method,
Object arguments)
Invokes the given method |
void |
run()
|
void |
setDelegate(Object delegate)
Allows the delegate to be changed such as when performing markup building |
void |
setProperty(String property,
Object newValue)
Sets the given property to the new value |
protected static Object |
throwRuntimeException(Throwable throwable)
|
Methods inherited from class groovy.lang.GroovyObjectSupport |
getMetaClass, setMetaClass |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Closure(Object delegate)
Method Detail |
public Object invokeMethod(String method, Object arguments)
GroovyObject
invokeMethod
in interface GroovyObject
invokeMethod
in class GroovyObjectSupport
public Object getProperty(String property)
getProperty
in interface GroovyObject
getProperty
in class GroovyObjectSupport
public void setProperty(String property, Object newValue)
GroovyObject
setProperty
in interface GroovyObject
setProperty
in class GroovyObjectSupport
public Object call()
public Object call(Object arguments)
arguments
- could be a single value or a List of values
protected static Object[] getParameters(Object arguments)
protected MetaMethod getDoCallMethod()
protected static Object throwRuntimeException(Throwable throwable)
public Object getDelegate()
public void setDelegate(Object delegate)
delegate
- public Class[] getParameterTypes()
public Closure asWritable()
public void run()
run
in interface Runnable
public Closure curry(Object arguments)
arguments
- public Object clone() throws CloneNotSupportedException
CloneNotSupportedException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |