|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsleep.bridges.SleepClosure
The Sleep Closure class. This class represents a Function object that is also a self contained closure
| Field Summary | |
static Class |
CLOSURE_CLASS
|
| Constructor Summary | |
SleepClosure(ScriptInstance si,
Block _code)
Creates a new Sleep Closure, with a brand new set of internal variables. |
|
SleepClosure(ScriptInstance si,
Block _code,
Variable _var)
Creates a new Sleep Closure that uses the specified variable container for its internal variables |
|
| Method Summary | |
Scalar |
callClosure(String message,
ScriptInstance si,
Stack locals)
"Safely" calls this closure. |
Scalar |
evaluate(String message,
ScriptInstance si,
Stack locals)
Evaluates the closure, use callClosure instead. |
ScriptInstance |
getOwner()
Returns the owning script instance |
Block |
getRunnableCode()
Returns the runnable block of code associated with this closure |
Variable |
getVariables()
Returns the variable container for this closures |
void |
setVariables(Variable _variables)
Sets the variable environment for this closure |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static Class CLOSURE_CLASS
| Constructor Detail |
public SleepClosure(ScriptInstance si,
Block _code)
public SleepClosure(ScriptInstance si,
Block _code,
Variable _var)
| Method Detail |
public ScriptInstance getOwner()
public Block getRunnableCode()
public Variable getVariables()
public void setVariables(Variable _variables)
public Scalar callClosure(String message,
ScriptInstance si,
Stack locals)
message - the message to pass to this closure (available as $0)
public Scalar evaluate(String message,
ScriptInstance si,
Stack locals)
evaluate in interface Functionmessage - the function being called.si - an instance of the script calling this function.locals - a stack containing the locals passed to this function. The locals are Scalar values passed in reverse order i.e. [arg n, arg n-1, ..., arg 1, arg 0]
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||