|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.omegahat.Environment.GUITools.OmegaListener
An abstract class that provides slots for storing an evaluable object
(expression or Function)
and an Evaluator
in which it should be evaluated.
This is used to implement connect the interpreted language
with Java classes by allowing the former to be used
as instances of the latter.
Methods of the Java class are implemented by evaluating
the callback object in the specified
org.omegahat.Environment.Interpreter.Envaluator.
| Field Summary | |
protected Evaluable |
callback
The object which is to be evaluated. |
protected Evaluator |
evaluator
The evaluator in which the evaluation of the callback is to be performed. |
| Constructor Summary | |
OmegaListener()
Default constructor for use by derived classes. |
|
OmegaListener(Evaluable callback)
Constructor specifying just the evaluable expression or function. |
|
OmegaListener(Evaluable callback,
Evaluator evaluator)
Constructor taking both the callback
and
evaluator |
|
| Method Summary | |
Evaluable |
callback()
Accessor to the callback field. |
Evaluable |
callback(Evaluable cb)
Accessor to set the callback field. |
java.lang.Object |
eval()
Evaluate the callback using the specified evaluator, returning the value and trapping any exceptions, displaying them as warnings via the evaluator. |
Evaluator |
evaluator()
Accessor to the evaluator field. |
Evaluator |
evaluator(Evaluator eval)
Accessor to set the evaluator field. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Evaluable callback
protected Evaluator evaluator
| Constructor Detail |
public OmegaListener(Evaluable callback)
public OmegaListener(Evaluable callback,
Evaluator evaluator)
callback
and
evaluatorpublic OmegaListener()
| Method Detail |
public Evaluator evaluator()
evaluator field.public Evaluator evaluator(Evaluator eval)
evaluator field.public Evaluable callback()
callback field.public Evaluable callback(Evaluable cb)
callback field.public java.lang.Object eval()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||