|
||||||||||
| 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(Object owner)
|
|
| 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 |
call(Object[] args)
|
Object |
clone()
|
Closure |
curry(Object[] arguments)
Support for closure currying |
Object |
getDelegate()
|
int |
getDirective()
|
int |
getMaximumNumberOfParameters()
|
Object |
getOwner()
|
Class[] |
getParameterTypes()
|
Object |
getProperty(String property)
|
boolean |
isCase(Object candidate)
|
void |
run()
|
void |
setDelegate(Object delegate)
Allows the delegate to be changed such as when performing markup building |
void |
setDirective(int directive)
|
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, 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 int DONE
public static int SKIP
| Constructor Detail |
|---|
public Closure(Object owner)
| Method Detail |
|---|
public Object getProperty(String property)
getProperty in interface GroovyObjectgetProperty in class GroovyObjectSupport
public void setProperty(String property,
Object newValue)
GroovyObject
setProperty in interface GroovyObjectsetProperty in class GroovyObjectSupportpublic boolean isCase(Object candidate)
public Object call()
public Object call(Object[] args)
public Object call(Object arguments)
arguments - could be a single value or a List of values
protected static Object throwRuntimeException(Throwable throwable)
public Object getOwner()
public Object getDelegate()
public void setDelegate(Object delegate)
delegate - public Class[] getParameterTypes()
public int getMaximumNumberOfParameters()
public Closure asWritable()
public void run()
run in interface Runnablepublic Closure curry(Object[] arguments)
arguments - public Object clone()
clone in class 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 | |||||||||