|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An evaluable action provides for dynamic evaluation of messages and code expressions. Argument values can be specified either when the action is constructed or at evaluation time. Actual argument values provided at evaluation time override any default argument values defined when the evaluable action was constructed.
By default, the unchecked exception PropagatedException
is raised when evaluation fails to allow the cause of a failure to be
propagated to the calling context. Alternate exception handling behavior
can be configured by using the setExceptionHandler
message
to specify an alternative ExceptionHandler
for the action.
The evaluable action mechanisms are an attempt to provide a Java facility with the notational simplicity of Smalltalk facilities for configuring dynamic behavior and evaluating messages and code blocks.
Method Summary | |
java.lang.Object |
evaluate()
Answer the result of evaluating the action. |
java.lang.Object |
evaluate(java.lang.Object anArg)
Answer the result of evaluating the active with the given argument value. |
java.lang.Object |
evaluate(java.lang.Object[] args)
Answer the result of evaluating the action with the given argument values. |
java.lang.Object |
evaluate(java.lang.Object arg1,
java.lang.Object arg2)
Answer the result of evaluating the action with the given argument values. |
java.lang.Object[] |
getArguments()
Answer the default arguments used for evaluating the action. |
java.lang.Object |
getReceiver()
Answer the object which performs the evaluation. |
java.lang.String |
getSelector()
Answer the name of the action. |
void |
setArguments(java.lang.Object[] arguments)
Specify the default arguments used for evaluating the action. |
void |
setExceptionHandler(ExceptionHandler aHandler)
Set the evaluation exception handler for this action. |
Method Detail |
public java.lang.Object evaluate()
PropagatedException
- if an exception occurs which is not
handled by the action's exception handlerpublic java.lang.Object evaluate(java.lang.Object anArg)
PropagatedException
- if an exception occurs which is not
handled by the action's exception handlerpublic java.lang.Object evaluate(java.lang.Object arg1, java.lang.Object arg2)
PropagatedException
- if an exception occurs which is not
handled by the action's exception handlerpublic java.lang.Object evaluate(java.lang.Object[] args)
PropagatedException
- if an exception occurs which is not
handled by the action's exception handlerpublic java.lang.Object[] getArguments()
The actual arguments used for evaluating the receiver will differ from the default argument values defined for the action if the client provides argument values at invocation time.
public java.lang.Object getReceiver()
public java.lang.String getSelector()
public void setArguments(java.lang.Object[] arguments)
The default arguments are used if the client does not provide argument values at invocation time.
public void setExceptionHandler(ExceptionHandler aHandler)
The actual arguments used for evaluating the receiver will differ from the default argument values defined for the action if the client provides argument values at invocation time.
|
GFL 1.1 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |