|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.glaivestone.javax.execution.AbstractEvaluableAction | +--com.glaivestone.javax.execution.ConstructorAction
An evaluable action which invokes a constructor to instantiate an object.
A number of static create
factory methods
are provided to make it easy to construct the common flavors
of constructor actions. The creation services provide
the notational simplicity of one-line expressions
in initialization logic for common cases.
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 | |
ConstructorAction(java.lang.Class aClass,
java.lang.reflect.Constructor aConstructor,
java.lang.Object[] arguments,
ExceptionHandler exceptionHandler)
Construct a new ConstructorAction which invokes
aConstructor to create a new instance of aClass . |
Method Summary | |
static ConstructorAction |
create(java.lang.Class aClass)
Create an action which will invoke the no-argument constructor to create a new instance of aClass when it is evaluated. |
static ConstructorAction |
create(java.lang.Class aClass,
java.lang.Class[] parmTypes)
Create an action which will invoke the constructor with the argument type signature specified by the parmTypes
argument types list to create a new instance of aClass
when it is evaluated. |
static ConstructorAction |
create(java.lang.Class aClass,
java.lang.Class[] parmTypes,
java.lang.Object[] args)
Create an action which will invoke the constructor with the argument type signature specified by the parmTypes
argument types list to create a new instance of aClass
using the argument values in args when it is evaluated. |
static ConstructorAction |
create(java.lang.Class aClass,
java.lang.reflect.Constructor aConstructor,
java.lang.Object[] args)
Create an action which will invoke the constructor aConstructor
to create a new instance of aClass using the argument values
in args when it is evaluated. |
java.lang.Object |
evaluate(java.lang.Object[] args)
Answer the result of evaluating the action with the given argument values. |
static java.lang.reflect.Constructor |
findConstructor(java.lang.Class aClass)
Answer the public no-argument constructor for aClass . |
static java.lang.reflect.Constructor |
findConstructor(java.lang.Class aClass,
java.lang.Class[] parmTypes)
Answer the public constructor with the argument type signature specified by the parmTypes argument types list for aClass . |
java.lang.reflect.Constructor |
getConstructor()
Answer the constructor 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 |
public ConstructorAction(java.lang.Class aClass, java.lang.reflect.Constructor aConstructor, java.lang.Object[] arguments, ExceptionHandler exceptionHandler)
ConstructorAction
which invokes
aConstructor
to create a new instance of aClass
.
The default arguments
are used if argument values
are not supplied dynamically when the action is evaluated.
Method Detail |
public static ConstructorAction create(java.lang.Class aClass)
aClass
when it is evaluated.
public static ConstructorAction create(java.lang.Class aClass, java.lang.Class[] parmTypes)
parmTypes
argument types list to create a new instance of aClass
when it is evaluated.
The client must provide the argument values when the action is evaluated.
public static ConstructorAction create(java.lang.Class aClass, java.lang.Class[] parmTypes, java.lang.Object[] args)
parmTypes
argument types list to create a new instance of aClass
using 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.
public static ConstructorAction create(java.lang.Class aClass, java.lang.reflect.Constructor aConstructor, java.lang.Object[] args)
aConstructor
to create a new instance of aClass
using 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.
public static java.lang.reflect.Constructor findConstructor(java.lang.Class aClass)
aClass
.
public static java.lang.reflect.Constructor findConstructor(java.lang.Class aClass, java.lang.Class[] parmTypes)
parmTypes
argument types list for aClass
.
public java.lang.Object evaluate(java.lang.Object[] args)
evaluate
in interface EvaluableAction
evaluate
in class AbstractEvaluableAction
EvaluableAction.evaluate()
public java.lang.reflect.Constructor getConstructor()
public java.lang.String getSelector()
getSelector
in interface EvaluableAction
getSelector
in class AbstractEvaluableAction
EvaluableAction.getSelector()
public java.lang.String toString()
toString
in class java.lang.Object
|
GFL 1.1 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |