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.env.jexl
Class JexlEvaluator

    java.lang.Object
      org.apache.commons.scxml.env.jexl.JexlEvaluator

All Implemented Interfaces:
  Evaluator, Serializable

public class JexlEvaluator
extends Object
implements Evaluator, Serializable

Evaluator implementation enabling use of JEXL expressions in SCXML documents.

See Also:
  Serialized Form

Constructor Summary
`JexlEvaluator()` Constructor.

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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JexlEvaluator

    public JexlEvaluator()

  Constructor.

Method Detail

### eval

    public Object eval(Context ctx,
                       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` - For a malformed expression
  See Also:
    `Evaluator.eval(Context, String)`

### evalCond

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

  Description copied from interface: `Evaluator`
  Evaluate a condition. Manifests as "cond" attributes of <transition>, <if> and <elseif> elements.

  Specified by:
    `evalCond` in interface `Evaluator`
  Parameters:
    `ctx` - variable context
    `expr` - expression
  Returns:
    true/false
  Throws:
    `SCXMLExpressionException` - A malformed exception
  See Also:
    `Evaluator.evalCond(Context, String)`

### evalLocation

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

  Description copied from interface: `Evaluator`
  Evaluate a location that returns a Node within an XML data tree. Manifests as "location" attributes of <assign> element.

  Specified by:
    `evalLocation` in interface `Evaluator`
  Parameters:
    `ctx` - variable context
    `expr` - expression
  Returns:
    The location node.
  Throws:
    `SCXMLExpressionException` - A malformed exception
  See Also:
    `Evaluator.evalLocation(Context, 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(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-2008 The Apache Software Foundation. All Rights Reserved.