Package org.eclipse.emf.ocl.parser

Definition of the extensible environment API for OCL parsing and evaluation.

See:
          Description

Interface Summary
Environment An Environment stores the variables created while evaluating an OCL expression, including self.
EnvironmentFactory A facotry for creating OCL parser Environments.
EvaluationEnvironment The evaluation environment keeps track of the current values of variables in the evaluation of an OCL expression.
PersistentEnvironment An OCL environment that supports persistence of the dynamically-generated bindings of generic types, based on the classifiers provided by the environment.
TypeResolver Definition of a resolver for the dynamically-generated OCL types based on the types in the user model.
 

Class Summary
AbstractEnvironmentFactory Partial implementation of the EnvironmentFactory interface, useful for subclassing for client metamodels.
EcoreEnvironment An Environment stores the variables created while evaluating an OCL expression, including self.
EcoreEnvironmentFactory Environment factory for the Ecore metamodel.
TypeResolverImpl Default implementation of the TypeResolver interface, storing the types that it generates in the a resource to support persistence of OCLExpressions referencing these types.
 

Exception Summary
ParserException This exception should be used whenever an exception is thrown by the OCL parser.
SemanticException This exception is thrown when an error is found while building the OCL AST.
 

Package org.eclipse.emf.ocl.parser Description

Definition of the extensible environment API for OCL parsing and evaluation.

Package Specification

This package defines the API for the environments in which OCL expressions are parsed and evaluated.

The Environment interface describes the environment in which an OCL expression is parsed. The environment provides two major functions to the parser:

Environments are created by environment factories. An EnvironmentFactory is provided to an IOCLHelper to create environments when it needs to, or by clients to create environments for working with the ExpressionsUtil utilities. Environment factories are useful for adapting metamodels to Ecore (possibly using the extensions in the org.eclipse.emf.ocl.uml package) to use OCL on them. The environments that they create would do the language mapping to look up classifiers etc. as appropriate to the metamodel. A default factory implementation for Ecore is provided and may be extended by clients to support other metamodels.

While the Environment class provides a parse-time environment, the EvaluationEnvironment keeps track of the current values of variables in the evaluation of an OCL expression. The AbstractEnvironmentFactory provides a default implementation suitable for most applications. Factories that customize the parser environments may, however, need to customize the evaluation environment as well to perform transformations on the values that it maintains.

See Also:
org.eclipse.emf.ocl.helper, ExpressionsUtil, EnvironmentFactory, Environment

Copyright 2002, 2006 IBM Corporation and others.
All Rights Reserved.