public class MinimalEvaluator extends Object implements Evaluator, Serializable
The SCXML Null Data Model only supports the SCXML "In(stateId)" builtin function.
Modifier and Type | Class and Description |
---|---|
static class |
MinimalEvaluator.MinimalEvaluatorProvider |
Evaluator.AssignType
Modifier and Type | Field and Description |
---|---|
static String |
SUPPORTED_DATA_MODEL |
DEFAULT_DATA_MODEL, ECMASCRIPT_DATA_MODEL, NULL_DATA_MODEL, XPATH_DATA_MODEL
Constructor and Description |
---|
MinimalEvaluator() |
Modifier and Type | Method and Description |
---|---|
Object |
eval(Context ctx,
String expr)
Evaluate an expression returning a data value
|
void |
evalAssign(Context ctx,
String location,
Object data,
Evaluator.AssignType type,
String attr)
Assigns data to a location
|
Boolean |
evalCond(Context ctx,
String expr)
Evaluate a condition.
|
Object |
evalLocation(Context ctx,
String expr)
Evaluate a location that returns a data assignable reference or list of references.
|
Object |
evalScript(Context ctx,
String script)
Evaluate a script.
|
String |
getSupportedDatamodel()
Get the datamodel type supported by this Evaluator
|
Context |
newContext(Context parent)
Create a new child context.
|
public static final String SUPPORTED_DATA_MODEL
public MinimalEvaluator()
public String getSupportedDatamodel()
Evaluator
getSupportedDatamodel
in interface Evaluator
public Object eval(Context ctx, String expr) throws SCXMLExpressionException
Evaluator
eval
in interface Evaluator
ctx
- variable contextexpr
- expressionSCXMLExpressionException
- A malformed expression exceptionpublic Boolean evalCond(Context ctx, String expr) throws SCXMLExpressionException
Evaluator
evalCond
in interface Evaluator
ctx
- variable contextexpr
- expressionSCXMLExpressionException
- A malformed expression exceptionpublic Object evalLocation(Context ctx, String expr) throws SCXMLExpressionException
Evaluator
evalLocation
in interface Evaluator
ctx
- variable contextexpr
- expressionSCXMLExpressionException
- A malformed expression exceptionpublic void evalAssign(Context ctx, String location, Object data, Evaluator.AssignType type, String attr) throws SCXMLExpressionException
Evaluator
evalAssign
in interface Evaluator
ctx
- variable contextlocation
- location expressiondata
- the data to assign.type
- the type of assignment to perform, null assumes Evaluator.AssignType.REPLACE_CHILDREN
attr
- the name of the attribute to add when using type Evaluator.AssignType.ADD_ATTRIBUTE
SCXMLExpressionException
- A malformed expression exceptionpublic Object evalScript(Context ctx, String script) throws SCXMLExpressionException
Evaluator
evalScript
in interface Evaluator
ctx
- variable contextscript
- The scriptSCXMLExpressionException
- A malformed scriptpublic Context newContext(Context parent)
Evaluator
newContext
in interface Evaluator
parent
- parent contextCopyright © 2005–2015 The Apache Software Foundation. All rights reserved.