|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PK
- is substituted by the metaclass representing the metamodel's
analogue for the UML 2.x PackageC
- corresponds to the UML Classifier metaclassO
- corresponds to the UML Operation metaclassP
- corresponds to the UML Property metaclassEL
- corresponds to the UML EnumerationLiteral metaclass
(Enumerations are simply represented as classifiers)PM
- corresponds to the UML Parameter metaclassS
- corresponds to the UML State metaclass (for metamodels
that describe state machines)COA
- corresponds to the UML CallOperationAction metaclass
(used in message expressions)SSA
- corresponds to the UML SendSignalAction metaclass
(used in message expressions)CT
- corresponds to the UML Constraint metaclassCLS
- corresponds to the UML Class metaclassE
- corresponds to the UML Element metaclasspublic interface EnvironmentFactory<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
A factory for creating OCL parser Environment
s. Clients of the OCL
parser that wish to use OCL with their metamodels can provide the parser
a factory that creates the suitable environments. The environment provides
mappings from the client's metamodel to the UML concepts required by the
parser (corresponding to the generic type parameters, below). Many of these
mappings are optional (e.g., state machines, signals, and association
classes aren't supported by all metamodels).
This interface is not intended to be implemented to be implemented
"directly" by providers of metamodel bindings.
It is highly recommended to extend the AbstractEnvironmentFactory
class, instead.
Since 1.2, the AbstractEnvironmentFactory
implements the
Adaptable
interface and provides an adapter for the
EnvironmentFactory.Lookup
interface. Use the
OCLUtil.getAdapter(EnvironmentFactory, Class)
method to obtain
adapters for any factory instance.
Nested Class Summary | |
---|---|
static interface |
EnvironmentFactory.Lookup<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E>
Optional adapter interface for look-up methods that throw LookupException s on abnormal failures (usually ambiguous names). |
Method Summary | |
---|---|
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
createAttributeContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent,
P property)
Creates an environment suitable for parsing OCL expressions on the specified property , which is some attribute
in the client's metamodel. |
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
createClassifierContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent,
C context)
Creates an environment suitable for parsing OCL expressions in the specified context , which is some classifier
in the client's model. |
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
createEnvironment()
Creates a root environment, in which package contexts and/or classifier contexts will be created as nested environments. |
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
createEnvironment(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent)
Creates a child environment of a specified parent , for
definition of nested scopes. |
EvaluationEnvironment<C,O,P,CLS,E> |
createEvaluationEnvironment()
Creates a new evaluation environment to track the values of variables in an OCL expression as it is evaluated. |
EvaluationEnvironment<C,O,P,CLS,E> |
createEvaluationEnvironment(EvaluationEnvironment<C,O,P,CLS,E> parent)
Creates a new evaluation environment as a nested environment of the specified parent. |
EvaluationVisitor<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
createEvaluationVisitor(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
EvaluationEnvironment<C,O,P,CLS,E> evalEnv,
Map<? extends CLS,? extends Set<? extends E>> extentMap)
Creates a new evaluation visitor, for the evaluation of OCL expressions. |
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
createInstanceContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent,
Object context)
Creates an environment suitable for parsing OCL expressions on the specified context object, which is an instance of some
classifier in the client's model. |
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
createOperationContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent,
O operation)
Creates an environment suitable for parsing OCL expressions on the specified operation , which is some operation
in the client's metamodel. |
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
createPackageContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent,
List<String> pathname)
Creates an environment suitable for parsing OCL expressions in the specified package context. |
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> |
loadEnvironment(Resource resource)
Loads an environment from the specified resource. |
Method Detail |
---|
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> createEnvironment()
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> createPackageContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent, List<String> pathname)
pathname
- the qualified package name (the "::"-separated parts)
createClassifierContext(org.eclipse.ocl.Environment, C)
,
createOperationContext(org.eclipse.ocl.Environment, O)
,
createAttributeContext(org.eclipse.ocl.Environment, P)
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> loadEnvironment(Resource resource)
resource
- a resource containing the persisted environmentEnvironment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> createClassifierContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent, C context)
context
, which is some classifier
in the client's model.
context
- the context classifier
createOperationContext(Environment, Object)
,
createAttributeContext(Environment, Object)
,
createInstanceContext(Environment, Object)
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> createInstanceContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent, Object context)
context
object, which is an instance of some
classifier in the client's model.
The context may be an instance of a model class or a data type value
on which an OCL expression would be evaluated. Note that the actual OCL
context classifier (as an OCL type or classifier) will be
inferred from the context instance according to the metamodel that the
environment factory supports, if possible. If not possible, then the
OclAny
type is assumed.
context
- the context object or value
createClassifierContext(Environment, Object)
,
OCLStandardLibrary.getOclAny()
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> createOperationContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent, O operation)
operation
, which is some operation
in the client's metamodel. Note that operation contexts can be defined
in the context of any classifier to which that operation is applicable.
parent
- the parent environment, defining the classifier contextoperation
- an operation in the client's metamodel
createClassifierContext(Environment, Object)
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> createAttributeContext(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent, P property)
property
, which is some attribute
in the client's metamodel. Note that attribute contexts can be defined
in the context of any classifier in which that attribute is available.
parent
- the parent environment, defining the classifier contextproperty
- an attribute in the client's metamodel
createClassifierContext(Environment, Object)
Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> createEnvironment(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> parent)
parent
, for
definition of nested scopes.
parent
- the parent environment
EvaluationEnvironment<C,O,P,CLS,E> createEvaluationEnvironment()
EvaluationEnvironment<C,O,P,CLS,E> createEvaluationEnvironment(EvaluationEnvironment<C,O,P,CLS,E> parent)
parent
- a nesting evaluation environment
EvaluationVisitor<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> createEvaluationVisitor(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, EvaluationEnvironment<C,O,P,CLS,E> evalEnv, Map<? extends CLS,? extends Set<? extends E>> extentMap)
env
- the environment in which the expression was originally parsed
(or some compatible environment)evalEnv
- the evaluation environment that the visitor is to use
for tracking variables, navigating properties, etc.extentMap
- the map of Classes to their extends
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |