com.glaivestone.javax.execution
Class StaticMethodAction

java.lang.Object
  |
  +--com.glaivestone.javax.execution.AbstractEvaluableAction
        |
        +--com.glaivestone.javax.execution.MessageAction
              |
              +--com.glaivestone.javax.execution.StaticMethodAction
All Implemented Interfaces:
EvaluableAction

public class StaticMethodAction
extends MessageAction

An evaluable action which sends a static message to a class.

A number of static create factory methods are provided to make it easy to construct the common flavors of static method actions. The creation services provide the notational simplicity of one-line expressions in initialization logic for common cases.

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
StaticMethodAction(java.lang.Object receiver, java.lang.reflect.Method aMethod, java.lang.Object[] arguments, ExceptionHandler exceptionHandler)
          Construct a new StaticMethodAction which sends the static message aMethod to the receiver class.
 
Method Summary
static StaticMethodAction create(java.lang.Class aClass, java.lang.reflect.Method aMethod, java.lang.Object[] args)
          Create an action which will send the message represented by aMethod to aClass with the argument values in args when it is evaluated.
static StaticMethodAction create(java.lang.Class aClass, java.lang.String selector)
          Create an action which will send the no-argument message selector to aClass when it is evaluated.
static StaticMethodAction create(java.lang.Class aClass, java.lang.String selector, java.lang.Class[] parmTypes)
          Create an action which will send the message selector with the argument type signature specified by the parmTypes argument types list to aClass when it is evaluated.
static StaticMethodAction create(java.lang.Class aClass, java.lang.String selector, java.lang.Class[] parmTypes, java.lang.Object[] args)
          Create an action which will send the message selector with the argument type signature specified by the parmTypes argument types list to aClass with the argument values in args when it is evaluated.
static java.lang.reflect.Method findMethod(java.lang.Class aClass, java.lang.String selector)
          Answer the public no-argument static method named selector which is declared in aClass.
static java.lang.reflect.Method findMethod(java.lang.Class aClass, java.lang.String selector, java.lang.Class[] parmTypes)
          Answer the public static method named selector with the argument type signature specified by the parmTypes argument types list which is declared in aClass.
 
Methods inherited from class com.glaivestone.javax.execution.MessageAction
evaluate, getMethod, getSelector, toString
 
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

StaticMethodAction

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

Method Detail

create

public static StaticMethodAction create(java.lang.Class aClass,
                                        java.lang.String selector)
Create an action which will send the no-argument message selector to aClass when it is evaluated.


create

public static StaticMethodAction create(java.lang.Class aClass,
                                        java.lang.String selector,
                                        java.lang.Class[] parmTypes)
Create an action which will send the message selector with the argument type signature specified by the parmTypes argument types list to aClass when it is evaluated.

The client must provide the argument values when the action is evaluated.


create

public static StaticMethodAction create(java.lang.Class aClass,
                                        java.lang.String selector,
                                        java.lang.Class[] parmTypes,
                                        java.lang.Object[] args)
Create an action which will send the message selector with the argument type signature specified by the parmTypes argument types list to aClass with the argument values in args when it is evaluated.

The client may override the default argument values of the action by providing actual argument values when the action is evaluated.


create

public static StaticMethodAction create(java.lang.Class aClass,
                                        java.lang.reflect.Method aMethod,
                                        java.lang.Object[] args)
Create an action which will send the message represented by aMethod to aClass with the argument values in args when it is evaluated.

The client may override the default argument values of the action by providing actual argument values when the action is evaluated.


findMethod

public static java.lang.reflect.Method findMethod(java.lang.Class aClass,
                                                  java.lang.String selector)
Answer the public no-argument static method named selector which is declared in aClass.


findMethod

public static java.lang.reflect.Method findMethod(java.lang.Class aClass,
                                                  java.lang.String selector,
                                                  java.lang.Class[] parmTypes)
Answer the public static method named selector with the argument type signature specified by the parmTypes argument types list which is declared in aClass.


GFL 1.1 API