org.eclipse.ocl.examples.library.ecore
Class EcoreExecutorManager

java.lang.Object
  extended by org.eclipse.ocl.examples.library.executor.ExecutorManager
      extended by org.eclipse.ocl.examples.library.ecore.EcoreExecutorManager
All Implemented Interfaces:
DomainEvaluator

public class EcoreExecutorManager
extends ExecutorManager

An EcoreExecutorManager instance provides the bridge between a conventional EMF execution context and the richer OCL Pivot concepts. Since the OCL concepts are not needed for simple expressions that make no use of types, the default construction is lightweight deferring construction costs until actually needed.


Field Summary
 
Fields inherited from class org.eclipse.ocl.examples.library.executor.ExecutorManager
standardLibrary
 
Constructor Summary
EcoreExecutorManager(java.lang.Object contextObject, ExecutorStandardLibrary standardLibrary)
          Construct an EMF to OCL execution bridge.
EcoreExecutorManager(java.lang.Object contextObject, java.util.Map<java.lang.Object,java.lang.Object> contextMap, ExecutorStandardLibrary standardLibrary)
          Deprecated. 
 
Method Summary
protected  IdResolver createIdResolver()
           
 DomainEvaluator createNestedEvaluator()
           
 DomainType getDynamicTypeOf(java.lang.Object value)
           
 IdResolver getIdResolver()
           
 DomainModelManager getModelManager()
          Return the manager of all model instances for use by allInstances() and hidden opposite support.
 DomainType getStaticTypeOf(java.lang.Object value)
           
 DomainType getStaticTypeOf(java.lang.Object value, java.lang.Iterable<?> values)
           
 DomainType getStaticTypeOf(java.lang.Object value, java.lang.Object... values)
           
 
Methods inherited from class org.eclipse.ocl.examples.library.executor.ExecutorManager
evaluate, evaluateIteration, getEvaluationEnvironment, getLogger, getStandardLibrary, isCanceled, setCanceled, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EcoreExecutorManager

public EcoreExecutorManager(@Nullable
                            java.lang.Object contextObject,
                            @NonNull
                            ExecutorStandardLibrary standardLibrary)
Construct an EMF to OCL execution bridge.

The user objects that contribute to allInstances are determined from the contents of all resources in the ResourceSet containing the user object (which should be an EObject).

The user meta-models are determined from the eClass()'s of all user objects and the transitive closure of all references.

Since determination of the domain of user models and meta-models can be expensive, the EcoreExecutorManager is cached for re-use as an adapter on the contextObject's ResourceSet.

Parameters:
contextObject - a user object from which the user objects and their meta-models will be deduced
standardLibrary - the OCL facilities

EcoreExecutorManager

@Deprecated
public EcoreExecutorManager(@Nullable
                                       java.lang.Object contextObject,
                                       @Nullable
                                       java.util.Map<java.lang.Object,java.lang.Object> contextMap,
                                       @NonNull
                                       ExecutorStandardLibrary standardLibrary)
Deprecated. 

Method Detail

createIdResolver

@NonNull
protected IdResolver createIdResolver()

createNestedEvaluator

@NonNull
public DomainEvaluator createNestedEvaluator()

getDynamicTypeOf

@NonNull
public DomainType getDynamicTypeOf(@Nullable
                                           java.lang.Object value)
Overrides:
getDynamicTypeOf in class ExecutorManager

getModelManager

@NonNull
public DomainModelManager getModelManager()
Description copied from interface: DomainEvaluator
Return the manager of all model instances for use by allInstances() and hidden opposite support.


getIdResolver

@NonNull
public IdResolver getIdResolver()

getStaticTypeOf

@NonNull
public DomainType getStaticTypeOf(@Nullable
                                          java.lang.Object value)
Specified by:
getStaticTypeOf in interface DomainEvaluator
Overrides:
getStaticTypeOf in class ExecutorManager

getStaticTypeOf

@NonNull
public DomainType getStaticTypeOf(@Nullable
                                          java.lang.Object value,
                                          @NonNull
                                          java.lang.Object... values)
Specified by:
getStaticTypeOf in interface DomainEvaluator
Overrides:
getStaticTypeOf in class ExecutorManager

getStaticTypeOf

@NonNull
public DomainType getStaticTypeOf(@Nullable
                                          java.lang.Object value,
                                          @NonNull
                                          java.lang.Iterable<?> values)
Specified by:
getStaticTypeOf in interface DomainEvaluator
Overrides:
getStaticTypeOf in class ExecutorManager