public class EcoreExecutorManager extends ExecutorManager
environment, standardLibrary
Constructor and Description |
---|
EcoreExecutorManager(java.lang.Object contextObject,
ExecutorStandardLibrary standardLibrary)
Construct an EMF to OCL execution bridge.
|
Modifier and Type | Method and Description |
---|---|
protected IdResolver |
createIdResolver() |
Type |
getDynamicTypeOf(java.lang.Object value) |
IdResolver |
getIdResolver() |
ModelManager |
getModelManager()
Return the manager of all model instances for use by allInstances() and hidden opposite support.
|
int |
getSeverity(java.lang.Object validationKey)
Return the StatusCodes severity with which the validation identified by validationKey is reported.
|
ExecutorStandardLibrary |
getStandardLibrary() |
Class |
getStaticTypeOf(java.lang.Object value) |
Class |
getStaticTypeOf(java.lang.Object value,
java.lang.Iterable<?> values) |
Class |
getStaticTypeOf(java.lang.Object value,
java.lang.Object... values) |
add, createNestedEvaluator, createRegexCache, dispose, evaluate, evaluateIteration, getCompleteEnvironment, getDiagnosticSeverity, getEnvironmentFactory, getEvaluationEnvironment, getLogger, getMetamodelManager, getRegexPattern, isCanceled, popEvaluationEnvironment, pushEvaluationEnvironment, replace, setCanceled, setLogger
public EcoreExecutorManager(@Nullable java.lang.Object contextObject, @NonNull ExecutorStandardLibrary standardLibrary)
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.
contextObject
- a user object from which the user objects and their meta-models will be deducedstandardLibrary
- the OCL facilities@NonNull protected IdResolver createIdResolver()
@NonNull public Type getDynamicTypeOf(@Nullable java.lang.Object value)
getDynamicTypeOf
in class ExecutorManager
@NonNull public IdResolver getIdResolver()
@NonNull public ModelManager getModelManager()
Evaluator
public int getSeverity(@Nullable java.lang.Object validationKey)
Evaluator
StatusCodes.OK severity suppresses the validation altogether.
StatusCodes.Warning is returned for any null or unknown key.
getSeverity
in interface Evaluator
getSeverity
in interface Executor
getSeverity
in class ExecutorManager
@NonNull public ExecutorStandardLibrary getStandardLibrary()
getStandardLibrary
in interface Evaluator
getStandardLibrary
in interface Executor
getStandardLibrary
in class ExecutorManager
public Class getStaticTypeOf(@Nullable java.lang.Object value)
getStaticTypeOf
in interface Evaluator
getStaticTypeOf
in interface Executor
getStaticTypeOf
in class ExecutorManager
public Class getStaticTypeOf(@Nullable java.lang.Object value, @NonNull java.lang.Object... values)
getStaticTypeOf
in interface Evaluator
getStaticTypeOf
in interface Executor
getStaticTypeOf
in class ExecutorManager
public Class getStaticTypeOf(@Nullable java.lang.Object value, @NonNull java.lang.Iterable<?> values)
getStaticTypeOf
in interface Evaluator
getStaticTypeOf
in interface Executor
getStaticTypeOf
in class ExecutorManager