Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.scxml
Interface Evaluator

All Known Implementing Classes:
  ELEvaluator, JexlEvaluator

public interface Evaluator

Interface for a component that may be used by the SCXML engines to evaluate the expressions within the SCXML document.

Method Summary
`Object` | `eval(Context ctx, String expr)` Evaluate an expression.
`Boolean` | `evalCond(Context ctx, String expr)` Evaluate a condition.
`Node` | `evalLocation(Context ctx, String expr)` Evaluate a location that returns a Node within an XML data tree.
`Context` | `newContext(Context parent)` Create a new child context.

Method Detail

### eval

    public Object eval(Context ctx,
                       String expr)
                throws SCXMLExpressionException

  Evaluate an expression.

  Parameters:
    `ctx` - variable context
    `expr` - expression
  Returns:
    a result of the evaluation
  Throws:
    `SCXMLExpressionException` - A malformed exception

### evalCond

    public Boolean evalCond(Context ctx,
                            String expr)
                     throws SCXMLExpressionException

  Evaluate a condition. Manifests as "cond" attributes of <transition>, <if> and <elseif> elements.

  Parameters:
    `ctx` - variable context
    `expr` - expression
  Returns:
    true/false
  Throws:
    `SCXMLExpressionException` - A malformed exception

### evalLocation

    public Node evalLocation(Context ctx,
                             String expr)
                      throws SCXMLExpressionException

  Evaluate a location that returns a Node within an XML data tree. Manifests as "location" attributes of <assign> element.

  Parameters:
    `ctx` - variable context
    `expr` - expression
  Returns:
    The location node.
  Throws:
    `SCXMLExpressionException` - A malformed exception

### newContext

    public Context newContext(Context parent)

  Create a new child context.

  Parameters:
    `parent` - parent context
  Returns:
    new child context

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2007 The Apache Software Foundation. All Rights Reserved.