|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ocl.examples.pivot.AbstractEnvironmentFactory
org.eclipse.ocl.examples.pivot.utilities.PivotEnvironmentFactory
public class PivotEnvironmentFactory
Implementation of the EnvironmentFactory
for parsing OCL expressions
on Ecore models.
Field Summary | |
---|---|
protected MetaModelManager |
metaModelManager
|
Constructor Summary | |
---|---|
PivotEnvironmentFactory()
Initializes me. |
|
PivotEnvironmentFactory(org.eclipse.emf.ecore.EPackage.Registry reg,
MetaModelManager metaModelManager)
Initializes me with an EPackage.Registry that the
environments I create will use to look up packages. |
Method Summary | |
---|---|
static PivotEnvironmentFactory |
basicGetGlobalRegistryInstance()
|
PivotEnvironment |
createEnvironment()
Creates a root environment, in which package contexts and/or classifier contexts will be created as nested environments. |
PivotEnvironment |
createEnvironment(Environment parent)
Creates a child environment of a specified parent , for
definition of nested scopes. |
EvaluationEnvironment |
createEvaluationEnvironment()
Creates a new evaluation environment to track the values of variables in an OCL expression as it is evaluated. |
EvaluationEnvironment |
createEvaluationEnvironment(EvaluationEnvironment parent)
Creates a new evaluation environment as a nested environment of the specified parent. |
static void |
disposeGlobalRegistryInstance()
Dispose of the global instance; this is intended for leakage detection in tests. |
protected Type |
getClassifier(java.lang.Object context)
Obtains client metamodel's classifier for the specified context object, which may be an instance of a classifier
in the user model or may actually be a classifier in the user model. |
org.eclipse.emf.ecore.EPackage.Registry |
getEPackageRegistry()
Obtains the package registry used by environment that I create to look up packages. |
static PivotEnvironmentFactory |
getGlobalRegistryInstance()
|
MetaModelManager |
getMetaModelManager()
|
PivotEnvironment |
loadEnvironment(org.eclipse.emf.ecore.resource.Resource resource)
Loads an environment from the specified resource. |
Methods inherited from class org.eclipse.ocl.examples.pivot.AbstractEnvironmentFactory |
---|
createClassifierContext, createEvaluationVisitor, createEvaluationVisitor, createInstanceContext, createOperationContext, createPackageContext, createPropertyContext, getAdapter, isEvaluationTracingEnabled, setEvaluationTracingEnabled |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@NonNull protected final MetaModelManager metaModelManager
Constructor Detail |
---|
public PivotEnvironmentFactory()
public PivotEnvironmentFactory(@Nullable org.eclipse.emf.ecore.EPackage.Registry reg, @Nullable MetaModelManager metaModelManager)
EPackage.Registry
that the
environments I create will use to look up packages.
reg
- my package registrymetaModelManager
- Method Detail |
---|
@Nullable public static PivotEnvironmentFactory basicGetGlobalRegistryInstance()
public static void disposeGlobalRegistryInstance()
@NonNull public static PivotEnvironmentFactory getGlobalRegistryInstance()
@NonNull public PivotEnvironment createEnvironment()
EnvironmentFactory
@NonNull public PivotEnvironment loadEnvironment(@NonNull org.eclipse.emf.ecore.resource.Resource resource)
EnvironmentFactory
resource
- a resource containing the persisted environment@Nullable public final org.eclipse.emf.ecore.EPackage.Registry getEPackageRegistry()
@NonNull public PivotEnvironment createEnvironment(@NonNull Environment parent)
EnvironmentFactory
parent
, for
definition of nested scopes.
parent
- the parent environment
@NonNull public EvaluationEnvironment createEvaluationEnvironment()
EnvironmentFactory
@NonNull public EvaluationEnvironment createEvaluationEnvironment(@NonNull EvaluationEnvironment parent)
EnvironmentFactory
parent
- a nesting evaluation environment
@NonNull protected Type getClassifier(@NonNull java.lang.Object context)
AbstractEnvironmentFactory
context
object, which may be an instance of a classifier
in the user model or may actually be a classifier in the user model.
getClassifier
in class AbstractEnvironmentFactory
context
- a context object or classifier
@NonNull public MetaModelManager getMetaModelManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |