org.apache.taglibs.rdc.scxml.env
Class ELEvaluator

java.lang.Object
  extended by org.apache.taglibs.rdc.scxml.env.ELEvaluator
All Implemented Interfaces:
Evaluator

public class ELEvaluator
extends java.lang.Object
implements Evaluator

EL engine interface for SCXML Interpreter.

Author:
Jaroslav Gergic

Constructor Summary
ELEvaluator()
          Constructor
 
Method Summary
 java.lang.Object eval(Context ctx, java.lang.String expr)
          Evaluate an expression
 java.lang.Boolean evalCond(Context ctx, java.lang.String expr)
          Evaluate a condition.
static boolean isMember(java.util.Set allStates, java.lang.String state)
          Does this state belong to the Set of these States.
 Context newContext(Context parent)
          Create a new child context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ELEvaluator

public ELEvaluator()
Constructor

Method Detail

eval

public java.lang.Object eval(Context ctx,
                             java.lang.String expr)
                      throws SCXMLExpressionException
Evaluate an expression

Specified by:
eval in interface Evaluator
Parameters:
ctx - variable context
expr - expression
Returns:
a result of the evaluation
Throws:
SCXMLExpressionException
See Also:
Evaluator.eval(org.apache.taglibs.rdc.scxml.Context, java.lang.String)

newContext

public Context newContext(Context parent)
Create a new child context.

Specified by:
newContext in interface Evaluator
Parameters:
parent - parent context
Returns:
new child context
See Also:
Evaluator.newContext(org.apache.taglibs.rdc.scxml.Context)

evalCond

public java.lang.Boolean evalCond(Context ctx,
                                  java.lang.String expr)
                           throws SCXMLExpressionException
Description copied from interface: Evaluator
Evaluate a condition.

Specified by:
evalCond in interface Evaluator
Parameters:
ctx - variable context
expr - expression
Returns:
true/false
Throws:
SCXMLExpressionException
See Also:
Evaluator.evalCond(org.apache.taglibs.rdc.scxml.Context, java.lang.String)

isMember

public static final boolean isMember(java.util.Set allStates,
                                     java.lang.String state)
Does this state belong to the Set of these States. Simple ID based comparator

Parameters:
allStates - The Set of State objects to look in
state - The State to compare with
Returns:
Whether this State belongs to this Set


Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.