|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.ocl.parser.AbstractEnvironmentFactory
AbstractEnvironmentFactory class,
instead.
public abstract class AbstractEnvironmentFactory
Partial implementation of the EnvironmentFactory interface, useful
for subclassing for client metamodels. This abstract class takes care of
some of the more common (and mundane) chores, such as:
The subclass's responsibility is to define how to:
EClassifier APIEOperation APIEStructuralFeature APIEPackage context (determined from the classifier context)This class is intended to be extended by clients, for the purpose of implementing metamodel-specified environment factories.
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.emf.ocl.parser.EnvironmentFactory |
|---|
ECORE_INSTANCE |
| Constructor Summary | |
|---|---|
protected |
AbstractEnvironmentFactory()
Deprecated. Initializes me. |
| Method Summary | |
|---|---|
protected abstract EClassifier |
asEClassifier(Object context)
Deprecated. Adapts the specified client metamodel context to the
EClassifier API. |
protected abstract EOperation |
asEOperation(Object operation)
Deprecated. Adapts the specified client metamodel operation to the
EOperation API. |
protected abstract EStructuralFeature |
asEStructuralFeature(Object property)
Deprecated. Adapts the specified client metamodel property to the
EStructuralFeature API. |
Environment |
createClassifierContext(Object context)
Deprecated. Creates an environment suitable for parsing OCL expressions on the specified object, which is some classifier
in the client's metamodel or an instance thereof. |
protected abstract Environment |
createEnvironment(EPackage packageContext)
Deprecated. Implemented by subclasses to create a new environment implementation on the specified package context. |
EvaluationEnvironment |
createEvaluationEnvironment()
Deprecated. Default evaluation environment is implemented as a Map
of String ==> Object. |
Map |
createExtentMap(Object object)
Deprecated. Default implementation considers the resource containing an EObject as defining the scope of the OCL classifier extents. |
Environment |
createOperationContext(Object context,
Object operation)
Deprecated. Creates an environment suitable for parsing OCL expressions on the specified operation, which is some operation
in the client's metamodel. |
Environment |
createPackageContext(List pathname)
Deprecated. Creates an environment suitable for parsing OCL expressions in the specified package context. |
Environment |
createPropertyContext(Object context,
Object property)
Deprecated. Creates an environment suitable for parsing OCL expressions on the specified property, which is some property
in the client's metamodel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.emf.ocl.parser.EnvironmentFactory |
|---|
createEnvironment |
| Constructor Detail |
|---|
protected AbstractEnvironmentFactory()
| Method Detail |
|---|
protected abstract Environment createEnvironment(EPackage packageContext)
asEClassifier(Object) method.
packageContext - the OCL package context (not null)
protected abstract EClassifier asEClassifier(Object context)
context to the
EClassifier API. This might just return the context
if it already is an EClassifier, or might return its type if it
is an instance of an EClassifier, or adapt it by some other
means to the EClassifier API.
context - a classifier in the client metamodel's definition of
what an OCL classifier is, or an instance thereof
protected abstract EOperation asEOperation(Object operation)
operation to the
EOperation API.
operation - an operation in the client metamodel's definition of
what an OCL operation is
protected abstract EStructuralFeature asEStructuralFeature(Object property)
property to the
EStructuralFeature API.
property - a property in the client metamodel's definition of
what an OCL property is
public Environment createClassifierContext(Object context)
EnvironmentFactoryobject, which is some classifier
in the client's metamodel or an instance thereof.
The context may be either the specific model element or primitive value
on which an OCL expression would be evaluated, or it may be an
EClassifier of the target metamodel against which an OCL
expression would be parsed. Note that, in the former case, the actual
OCL context classifier (as an OCL type or EClassifier) will be
inferred from the context object according to the nature of the
environment factory.
createClassifierContext in interface EnvironmentFactorycontext - the context object or classifier
EnvironmentFactory.createOperationContext(Object, Object)public Environment createPackageContext(List pathname)
EnvironmentFactory
createPackageContext in interface EnvironmentFactorypathname - the qualified package name (the ::-separated parts)
EnvironmentFactory.createClassifierContext(Object),
EnvironmentFactory.createOperationContext(Object, Object)
public Environment createOperationContext(Object context,
Object operation)
EnvironmentFactoryoperation, 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.
createOperationContext in interface EnvironmentFactorycontext - the context element or classifier. Either way, this
indicates the classifier context in which to define the operation
context (as in the EnvironmentFactory.createClassifierContext(Object) method)operation - an operation in the client's metamodel
EnvironmentFactory.createClassifierContext(Object)
public Environment createPropertyContext(Object context,
Object property)
EnvironmentFactoryproperty, which is some property
in the client's metamodel. Note that property contexts can be defined
in the context of any classifier in which that property is available.
createPropertyContext in interface EnvironmentFactorycontext - the context element or classifier. Either way, this
indicates the classifier context in which to define the property
context (as in the EnvironmentFactory.createClassifierContext(Object) method)property - a property (structural feature) in the client's metamodel
EnvironmentFactory.createClassifierContext(Object)public EvaluationEnvironment createEvaluationEnvironment()
Map
of String ==> Object.
createEvaluationEnvironment in interface EnvironmentFactorypublic Map createExtentMap(Object object)
object is not an EObject, we have no
access to any such scope, so all extents will be empty.
createExtentMap in interface EnvironmentFactoryobject - a context object in the scope that covers the OCL
classifier extents
|
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 | |||||||||