# com.bea.p13n.expression
ExpressionFactory Class

public abstract class ExpressionFactory
extends `Object`

A factory class to create instances of the various implementation classes in the expression package.

Hierarchy
  `Object`
  `ExpressionFactory`

## Constructor Summary

ExpressionFactory()

## Method Summary

`public static `Evaluator`` | `createEvaluator`(`Map` environment) Creates a stateful `Evaluator` using the supplied environment.
`public static `Evaluator`` | `createEvaluator`(`Map` environment, `UnificationList` unificationList) Creates an `Evaluator` object using the supplied environment and a `UnificationList`.
`public static `Executor`` | `createExecutor`(`Map` environment) Creates an `Executor` if it is not cached, otherwise returns the cached `Executor`.
`public static `Expression`` | `createExpression`(`Map` environment, `Reader` reader) Creates an `Expression` using the supplied environment, reading and parsing the characters from the supplied reader.
`public static `Expression`` | `createExpression`(`Map` environment, `String` xmlString) Creates an `Expression` using the supplied environment and parsing the supplied string.
`public static `Optimizer`` | `createOptimizer`(`Map` environment, `ObjectFilter` objectFilter) Creates an `Optimizer` using the supplied environment and an `ObjectFilter`.
`public static `UnificationList`` | `createUnificationList`(`Map` environment) Creates a `UnificationList` using the supplied environment.
`public static `Unifier`` | `createUnifier`(`Map` environment, `UnificationList` unificationList) Creates a `Unifier` using the supplied environment and the `UnificationList`.
`public static `Validator`` | `createValidator`(`Map` environment) Creates a stateful `Evaluator` object using the supplied environment.
`public static `Validator`` | `createValidator`(`Map` environment, `Evaluator` evaluator) Creates a `Validator` object using the supplied environment and an `Evaluator`.

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

## Constructor Detail

### ExpressionFactory

    public ExpressionFactory()

## Method Detail

### createEvaluator(Map) Method

    public static Evaluator createEvaluator(Map environment)

Creates a stateful `Evaluator` using the supplied environment.

#### Parameters

environment
  The environment information to be used during creation of an `Evaluator`.

#### Returns

An `Evaluator` that can evaluate an expression.

Related Topics

``Evaluator``

### createEvaluator(Map, UnificationList) Method

    public static Evaluator createEvaluator(Map environment,
                                            UnificationList unificationList)

Creates an `Evaluator` object using the supplied environment and a `UnificationList`. If the supplied `UnificationList` is null then a stateful `Evaluator` is returned, otherwise a stateless `Evaluator` is created by associating the supplied `UnificationList`.

#### Parameters

environment
  The environment information to be used during creation of an `Evaluator`.

unificationList
  An UnificationList.

#### Returns

An `Evaluator` that can evaluate an expression.

Related Topics

``Evaluator``

### createExecutor(Map) Method

    public static Executor createExecutor(Map environment)

Creates an `Executor` if it is not cached, otherwise returns the cached `Executor`.

#### Parameters

environment
  The environment information to be used during creation of an `Executor`.

#### Returns

An `Executor` that can execute an expression.

Related Topics

``Executor``

### createExpression(Map, Reader) Method

    public static Expression createExpression(Map environment,
                                              Reader reader)
         throws ExpressionException

Creates an `Expression` using the supplied environment, reading and parsing the characters from the supplied reader.

#### Parameters

environment
  The information that is used to create an `Expression`.

reader
  The reader from which the characters will be read and parsed into an expression object.

#### Returns

An `Expression`.

#### Exceptions

``ExpressionException``
  If an error occurs during reading or parsing.

Related Topics

``Expression``

### createExpression(Map, String) Method

    public static Expression createExpression(Map environment,
                                              String xmlString)
         throws ExpressionException

Creates an `Expression` using the supplied environment and parsing the supplied string.

#### Parameters

environment
  The information that is used to create an `Expression`.

xmlString
  The XML string that is read and parsed into an expression object.

#### Returns

An `Expression`.

#### Exceptions

``ExpressionException``
  If an error occurs during parsing.

Related Topics

``Expression``

### createOptimizer(Map, ObjectFilter) Method

    public static Optimizer createOptimizer(Map environment,
                                            ObjectFilter objectFilter)

Creates an `Optimizer` using the supplied environment and an `ObjectFilter`.

#### Parameters

environment
  The information that is used to create an `Optimizer`.

objectFilter
  An `ObjectFilter` that is used during optimization.

#### Returns

An `Optimizer` that can optimize an expression.

Related Topics

``Optimizer``

### createUnificationList(Map) Method

    public static UnificationList createUnificationList(Map environment)

Creates a `UnificationList` using the supplied environment.

#### Parameters

environment
  A `Map` containing the environment information that is used to create a `UnificationList`.

#### Returns

A `UnificationList`.

Related Topics

``UnificationList``

### createUnifier(Map, UnificationList) Method

    public static Unifier createUnifier(Map environment,
                                        UnificationList unificationList)

Creates a `Unifier` using the supplied environment and the `UnificationList`.

#### Parameters

environment
  A `Map` containing environment information that is used to create a `Unifier`.

unificationList
  A `UnificationList` that is used to bind variables to their values.

#### Returns

A `Unifier` that can unify an expression.

Related Topics

``Unifier``

### createValidator(Map) Method

    public static Validator createValidator(Map environment)

Creates a stateful `Evaluator` object using the supplied environment.

#### Parameters

environment
  The environment information to be used during creation of the `Evaluator`.

#### Returns

A `Validator` that can validate an expression.

Related Topics

``Validator``

### createValidator(Map, Evaluator) Method

    public static Validator createValidator(Map environment,
                                            Evaluator evaluator)

Creates a `Validator` object using the supplied environment and an `Evaluator`. If the supplied `Evaluator` is null then a stateful `Validator` is returned otherwise a stateless `Validator` is created by associating the given `Evaluator`.

#### Parameters

environment
  The environment information to be used during creation of the `Validator`.

evaluator
  An `Evaluator` to evaluate an expression during validation.

#### Returns

A `Validator` that can validate an expression.

Related Topics

``Validator``