com.glaivestone.javax.execution
Class MessageAction

java.lang.Object
  |
  +--com.glaivestone.javax.execution.AbstractEvaluableAction
        |
        +--com.glaivestone.javax.execution.MessageAction
All Implemented Interfaces:
EvaluableAction
Direct Known Subclasses:
InstanceMethodAction, StaticMethodAction

public class MessageAction
extends AbstractEvaluableAction

An evaluable action which invokes a method to send an message to the receiver of the action.

Author:
Deb Lewis

Field Summary
 
Fields inherited from class com.glaivestone.javax.execution.AbstractEvaluableAction
CONTINUABLE_HANDLER, DEFAULT_HANDLER, EMPTY_ARGS, EMPTY_PARM_TYPES, PROPAGATING_HANDLER, TERMINATING_HANDLER
 
Constructor Summary
MessageAction(java.lang.Object receiver, java.lang.reflect.Method aMethod, java.lang.Object[] arguments, ExceptionHandler exceptionHandler)
          Construct a new MessageAction which sends the message aMethod to receiver.
 
Method Summary
 java.lang.Object evaluate(java.lang.Object[] args)
          Answer the result of evaluating the action with the given argument values.
 java.lang.reflect.Method getMethod()
          Answer the method which is invoked to evaluate this action.
 java.lang.String getSelector()
          Answer the name of the action.
 java.lang.String toString()
          Answer a string describing this action.
 
Methods inherited from class com.glaivestone.javax.execution.AbstractEvaluableAction
evaluate, evaluate, evaluate, getArguments, getNumberOfArguments, getOriginalException, getReceiver, setArguments, setExceptionHandler
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageAction

public MessageAction(java.lang.Object receiver,
                     java.lang.reflect.Method aMethod,
                     java.lang.Object[] arguments,
                     ExceptionHandler exceptionHandler)
Construct a new MessageAction which sends the message aMethod to receiver. The default arguments are used if argument values are not supplied dynamically when the action is evaluated.

Method Detail

evaluate

public java.lang.Object evaluate(java.lang.Object[] args)
Answer the result of evaluating the action with the given argument values.

Specified by:
evaluate in interface EvaluableAction
Specified by:
evaluate in class AbstractEvaluableAction
See Also:
EvaluableAction.evaluate(Object[])

getMethod

public java.lang.reflect.Method getMethod()
Answer the method which is invoked to evaluate this action.


getSelector

public java.lang.String getSelector()
Answer the name of the action.

Specified by:
getSelector in interface EvaluableAction
Specified by:
getSelector in class AbstractEvaluableAction
See Also:
EvaluableAction.getSelector()

toString

public java.lang.String toString()
Answer a string describing this action.

Overrides:
toString in class java.lang.Object

GFL 1.1 API