|
|||||
FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Field Summary | |
---|---|
int |
DELEGATE_FIRST
|
int |
DELEGATE_ONLY
|
int |
DONE
|
def |
EMPTY_OBJECT_ARRAY
|
int |
OWNER_FIRST
|
int |
OWNER_ONLY
|
int |
SKIP
|
int |
TO_SELF
|
Object |
delegate
|
int |
directive
|
int |
maximumNumberOfParameters
|
Object |
owner
|
def |
parameterTypes
|
int |
resolveStrategy
|
Object |
thisObject
|
Constructor Summary | |
Closure(Object owner, Object thisObject)
|
|
Closure(Object owner)
|
Method Summary | |
---|---|
Closure |
asWritable()
|
Object |
call()
Invokes the closure without any parameters, returning any value if applicable. |
Object |
call(def args)
|
Object |
call(Object arguments)
Invokes the closure, returning any value if applicable. |
Object |
clone()
|
Closure |
curry(def arguments)
Support for closure currying |
Object |
getDelegate()
typically the outer class when the closure is constructed |
int |
getMaximumNumberOfParameters()
of this closure can take |
Object |
getOwner()
typically the outer class when the closure is constructed |
def |
getParameterTypes()
of this closure |
Object |
getProperty(String property)
|
Object |
getPropertyDelegateFirst(String property)
|
Object |
getPropertyOwnerFirst(String property)
|
Object |
getPropertyTryThese(String property, Object firstTry, Object secondTry)
|
int |
getResolveStrategy()
Gets the strategy which the closure users to resolve methods and properties |
Object |
getThisObject()
|
boolean |
isCase(Object candidate)
|
void |
run()
|
void |
setDelegate(Object delegate)
Allows the delegate to be changed such as when performing markup building |
void |
setProperty(String property, Object newValue)
|
void |
setPropertyDelegateFirst(String property, Object newValue)
|
void |
setPropertyOwnerFirst(String property, Object newValue)
|
void |
setPropertyTryThese(String property, Object newValue, Object firstTry, Object secondTry)
|
void |
setResolveStrategy(int resolveStrategy)
Sets the strategy which the closure uses to resolve property references. |
static Object |
throwRuntimeException(Throwable throwable)
|
Constructor Detail |
---|
public Closure(Object owner, Object thisObject)
public Closure(Object owner)
Method Detail |
---|
public Closure asWritable()
public Object call()
public Object call(def args)
public Object call(Object arguments)
public Object clone()
public Closure curry(def arguments)
public Object getDelegate()
public int getMaximumNumberOfParameters()
public Object getOwner()
public def getParameterTypes()
public Object getProperty(String property)
Object getPropertyDelegateFirst(String property)
Object getPropertyOwnerFirst(String property)
Object getPropertyTryThese(String property, Object firstTry, Object secondTry)
public int getResolveStrategy()
public Object getThisObject()
public boolean isCase(Object candidate)
public void run()
public void setDelegate(Object delegate)
public void setProperty(String property, Object newValue)
void setPropertyDelegateFirst(String property, Object newValue)
void setPropertyOwnerFirst(String property, Object newValue)
void setPropertyTryThese(String property, Object newValue, Object firstTry, Object secondTry)
public void setResolveStrategy(int resolveStrategy)
static Object throwRuntimeException(Throwable throwable)