|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgroovy.lang.GroovyObjectSupport
groovy.lang.Closure
public abstract class Closure
Represents any closure object in Groovy.
| Field Summary | |
|---|---|
static int |
DONE
|
protected int |
maximumNumberOfParameters
|
static int |
SKIP
|
| Constructor Summary | |
|---|---|
Closure(java.lang.Object owner)
|
|
Closure(java.lang.Object owner,
java.lang.Object thisObject)
|
|
| 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 |
call(java.lang.Object[] args)
|
java.lang.Object |
clone()
|
Closure |
curry(java.lang.Object[] arguments)
Support for closure currying |
java.lang.Object |
getDelegate()
|
int |
getDirective()
|
int |
getMaximumNumberOfParameters()
|
java.lang.Object |
getOwner()
|
java.lang.Class[] |
getParameterTypes()
|
java.lang.Object |
getProperty(java.lang.String property)
|
protected java.lang.Object |
getThisObject()
|
boolean |
isCase(java.lang.Object candidate)
|
void |
run()
|
void |
setDelegate(java.lang.Object delegate)
Allows the delegate to be changed such as when performing markup building |
void |
setDirective(int directive)
|
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, invokeMethod, setMetaClass |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int maximumNumberOfParameters
public static final int DONE
public static final int SKIP
| Constructor Detail |
|---|
public Closure(java.lang.Object owner,
java.lang.Object thisObject)
public Closure(java.lang.Object owner)
| Method Detail |
|---|
protected java.lang.Object getThisObject()
public java.lang.Object getProperty(java.lang.String property)
getProperty in interface GroovyObjectgetProperty in class GroovyObjectSupport
public void setProperty(java.lang.String property,
java.lang.Object newValue)
GroovyObject
setProperty in interface GroovyObjectsetProperty in class GroovyObjectSupportpublic boolean isCase(java.lang.Object candidate)
public java.lang.Object call()
public java.lang.Object call(java.lang.Object[] args)
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 throwRuntimeException(java.lang.Throwable throwable)
public java.lang.Object getOwner()
public java.lang.Object getDelegate()
public void setDelegate(java.lang.Object delegate)
delegate - public java.lang.Class[] getParameterTypes()
public int getMaximumNumberOfParameters()
public Closure asWritable()
public void run()
run in interface java.lang.Runnablepublic Closure curry(java.lang.Object[] arguments)
arguments - public java.lang.Object clone()
clone in class java.lang.Objectpublic int getDirective()
public void setDirective(int directive)
directive - The directive to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||