|
|||||||||||
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(java.lang.Object delegate)
|
Method Summary | |
Closure |
asWritable()
|
java.lang.Object |
call()
Invokes the closure without any parameters, returning any value if applicable. |
java.lang.Object |
call(java.lang.Object arguments)
Invokes the closure, returning any value if applicable. |
java.lang.Object |
clone()
Allows the closure to be cloned |
Closure |
curry(java.lang.Object arguments)
Support for closure currying |
java.lang.Object |
getDelegate()
|
protected MetaMethod |
getDoCallMethod()
|
protected static java.lang.Object[] |
getParameters(java.lang.Object arguments)
|
java.lang.Class[] |
getParameterTypes()
|
java.lang.Object |
getProperty(java.lang.String property)
|
java.lang.Object |
invokeMethod(java.lang.String method,
java.lang.Object arguments)
Invokes the given method |
void |
run()
|
void |
setDelegate(java.lang.Object delegate)
Allows the delegate to be changed such as when performing markup building |
void |
setProperty(java.lang.String property,
java.lang.Object newValue)
Sets the given property to the new value |
protected static java.lang.Object |
throwRuntimeException(java.lang.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(java.lang.Object delegate)
Method Detail |
public java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments)
GroovyObject
invokeMethod
in interface GroovyObject
invokeMethod
in class GroovyObjectSupport
public java.lang.Object getProperty(java.lang.String property)
getProperty
in interface GroovyObject
getProperty
in class GroovyObjectSupport
public void setProperty(java.lang.String property, java.lang.Object newValue)
GroovyObject
setProperty
in interface GroovyObject
setProperty
in class GroovyObjectSupport
public java.lang.Object call()
public java.lang.Object call(java.lang.Object arguments)
arguments
- could be a single value or a List of values
protected static java.lang.Object[] getParameters(java.lang.Object arguments)
protected MetaMethod getDoCallMethod()
protected static java.lang.Object throwRuntimeException(java.lang.Throwable throwable)
public java.lang.Object getDelegate()
public void setDelegate(java.lang.Object delegate)
delegate
- public java.lang.Class[] getParameterTypes()
public Closure asWritable()
public void run()
run
in interface java.lang.Runnable
public Closure curry(java.lang.Object arguments)
arguments
- public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |