Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.expression
Interface Executor

    public interface Executor

The Executor interface is implemented by a class that can perform the Unification-Validation-Evaluation cycle on an Expression.

Method Summary
`Object` | `execute(Expression expression, Unifier unifier, Validator validator, Evaluator evaluator)` Executes the supplied expression in a stateless/stateful mode depending on the supplied evaluator.

Method Detail

### execute

    Object execute(Expression expression,
                   Unifier unifier,
                   Validator validator,
                   Evaluator evaluator)
                   throws IllegalArgumentException,
                          ExpressionException

  Executes the supplied expression in a stateless/stateful mode depending on the supplied evaluator.

       The algorithm, for execution is as follows.
       UNIFICATION
       1. Unify the supplied expression if the supplied unifier is not null,
          otherwise ignore unification.

       VALIDATION
       2. Validate the supplied expression if the supplied validator is not null,
          otherwise ignore validation.

       EVALUATION
       3. If the supplied evaluator is not null, then the supplied expression is evaluated
          in the stateful or stateless mode depending on the type of the supplied evaluator.

          3a. If the supplied evaluator is null then throw IllegalArgumentException.

       4. Return the result.

       Note: IF STATELESS EVALUATOR IS PASSED THEN UNIFIER SHOULD BE NULL.

  Parameters
    `expression` - An `Expression` to be evaluated.
    `unifier` - The `Unifier` that can unify the supplied expression.
    `validator` - The `Validator` that can validate the supplied expression.
    `evaluator` - The `Evaluator` that can evaluate/execute the supplied expression.
  Returns
    The result of executing the supplied expression.
  Throws
    `IllegalArgumentException` - If the supplied evaluator is `null`.
    `ExpressionException` - If an error occurs during the execution of the supplied expression.
  See Also
    `Expression`, `Unifier`, `Validator`, `Evaluator`

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

Copyright © 2008 BEA Systems, Inc. All Rights Reserved