public abstract class ExecutorManager extends java.lang.Object implements Executor.ExecutorExtension
Executor.ExecutorExtension| Modifier and Type | Field and Description |
|---|---|
protected CompleteEnvironment |
environment |
protected StandardLibrary |
standardLibrary |
| Constructor and Description |
|---|
ExecutorManager(CompleteEnvironment environment) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(TypedElement referredVariable,
java.lang.Object value) |
Evaluator |
createNestedEvaluator()
Deprecated.
Evaluator no longer nests
|
protected java.util.Map<java.lang.String,java.util.regex.Pattern> |
createRegexCache()
Creates (on demand) the regular-expression matcher cache.
|
void |
dispose() |
Value |
evaluate(OCLExpression body) |
Value |
evaluateIteration(Type returnType,
CollectionValue sourceVal,
TypedElement accumulator,
OCLExpression body,
TypedElement[] iterators) |
CompleteEnvironment |
getCompleteEnvironment() |
int |
getDiagnosticSeverity(int severityPreference,
java.lang.Object resultValue)
Return the org.eclipse.emf.common.util.Diagnostic severity to be reported for a non-true
validation resultValue given a severityPreference defined by a StatusCodes value.
|
Type |
getDynamicTypeOf(java.lang.Object value) |
EnvironmentFactory |
getEnvironmentFactory() |
EvaluationEnvironment |
getEvaluationEnvironment() |
EvaluationLogger |
getLogger()
Return the logger handling oclLog() invocations or null for none.
|
MetamodelManager |
getMetamodelManager() |
java.util.regex.Pattern |
getRegexPattern(java.lang.String regex)
Return a cached matcher for a give regular expression.
|
int |
getSeverity(java.lang.Object validationKey)
Return the StatusCodes severity with which the validation identified by validationKey is reported.
|
StandardLibrary |
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) |
boolean |
isCanceled()
Return true if the evaluation has been canceled.
|
void |
popEvaluationEnvironment() |
EvaluationEnvironment |
pushEvaluationEnvironment(NamedElement executableObject,
java.lang.Object caller) |
EvaluationEnvironment |
pushEvaluationEnvironment(NamedElement executableObject,
OCLExpression callingObject)
Deprecated.
use TypedElement argument
|
void |
replace(TypedElement referredVariable,
java.lang.Object value) |
void |
resetCaches() |
void |
setCanceled(boolean isCanceled)
Request cancelation of the current the evaluation, or reset the request for a new evaluation.
|
void |
setLogger(EvaluationLogger logger)
Specify the logger to handle oclLog() invocations or null for none.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIdResolver, getModelManager@NonNull protected final CompleteEnvironment environment
@NonNull protected final StandardLibrary standardLibrary
public ExecutorManager(@NonNull
CompleteEnvironment environment)
public void add(@NonNull
TypedElement referredVariable,
@Nullable
java.lang.Object value)
@Deprecated @NonNull public Evaluator createNestedEvaluator()
createNestedEvaluator in interface Evaluator@NonNull protected java.util.Map<java.lang.String,java.util.regex.Pattern> createRegexCache()
getRegexPattern(String)@NonNull public Value evaluate(@NonNull OCLExpression body)
public Value evaluateIteration(Type returnType, CollectionValue sourceVal, TypedElement accumulator, OCLExpression body, TypedElement[] iterators)
@NonNull public CompleteEnvironment getCompleteEnvironment()
getCompleteEnvironment in interface EvaluatorgetCompleteEnvironment in interface Executorpublic int getDiagnosticSeverity(int severityPreference,
@Nullable
java.lang.Object resultValue)
EvaluatorgetDiagnosticSeverity in interface Evaluator@NonNull public Type getDynamicTypeOf(@Nullable java.lang.Object value)
@NonNull public EnvironmentFactory getEnvironmentFactory()
getEnvironmentFactory in interface Executor@NonNull public EvaluationEnvironment getEvaluationEnvironment()
getEvaluationEnvironment in interface EvaluatorgetEvaluationEnvironment in interface Executor@Nullable public EvaluationLogger getLogger()
Evaluator@NonNull public MetamodelManager getMetamodelManager()
getMetamodelManager in interface Executor@NonNull
public java.util.regex.Pattern getRegexPattern(@NonNull
java.lang.String regex)
getRegexPattern in interface EvaluatorgetRegexPattern in interface Executorpublic 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 EvaluatorgetSeverity in interface Executor@NonNull public StandardLibrary getStandardLibrary()
getStandardLibrary in interface EvaluatorgetStandardLibrary in interface Executorpublic Class getStaticTypeOf(@Nullable java.lang.Object value)
getStaticTypeOf in interface EvaluatorgetStaticTypeOf in interface Executorpublic Class getStaticTypeOf(@Nullable java.lang.Object value, @NonNull java.lang.Object... values)
getStaticTypeOf in interface EvaluatorgetStaticTypeOf in interface Executorpublic Class getStaticTypeOf(@Nullable java.lang.Object value, @NonNull java.lang.Iterable<?> values)
getStaticTypeOf in interface EvaluatorgetStaticTypeOf in interface Executorpublic boolean isCanceled()
EvaluatorisCanceled in interface Evaluatorpublic void setCanceled(boolean isCanceled)
EvaluatorEvaluationHaltedException when an expression,
operation or iteration is next invoked.setCanceled in interface Evaluatorpublic void setLogger(@Nullable
EvaluationLogger logger)
Evaluatorpublic void popEvaluationEnvironment()
popEvaluationEnvironment in interface Executor@Deprecated @NonNull public EvaluationEnvironment pushEvaluationEnvironment(@NonNull NamedElement executableObject, @Nullable OCLExpression callingObject)
pushEvaluationEnvironment in interface Executor@NonNull public EvaluationEnvironment pushEvaluationEnvironment(@NonNull NamedElement executableObject, @Nullable java.lang.Object caller)
pushEvaluationEnvironment in interface Executor.ExecutorExtensionpublic void replace(@NonNull
TypedElement referredVariable,
@Nullable
java.lang.Object value)
public void resetCaches()
resetCaches in interface Executor.ExecutorExtension