|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ocl.examples.pivot.util.AbstractVisitor<R,C>
org.eclipse.ocl.examples.pivot.util.AbstractExtendingVisitor<java.lang.Object,java.lang.Object>
org.eclipse.ocl.examples.pivot.evaluation.AbstractEvaluationVisitor
public abstract class AbstractEvaluationVisitor
An evaluation visitor implementation for OCL expressions.
Note that this class is not intended to be used or extended by
clients. Use the EvaluationVisitor interface, instead.
See the Environment class for a description of the
generic type parameters of this class.
| Field Summary | |
|---|---|
protected Environment |
environment
|
protected EvaluationEnvironment |
evaluationEnvironment
|
protected MetaModelManager |
metaModelManager
|
protected DomainModelManager |
modelManager
|
protected org.eclipse.emf.common.util.Monitor |
monitor
Set non-nullby setMonitor(org.eclipse.emf.common.util.Monitor) to terminate execution at next iteration/operation call. |
protected EvaluationVisitor |
undecoratedVisitor
|
| Fields inherited from class org.eclipse.ocl.examples.pivot.util.AbstractVisitor |
|---|
context |
| Constructor Summary | |
|---|---|
protected |
AbstractEvaluationVisitor(Environment env,
EvaluationEnvironment evalEnv,
DomainModelManager modelManager)
Initializes me. |
| Method Summary | |
|---|---|
protected java.util.Map<java.lang.String,java.util.regex.Pattern> |
createRegexCache()
Creates (on demand) the regular-expression matcher cache. |
Environment |
getEnvironment()
Obtains the environment that provides the metamodel semantics for the expression to be evaluated. |
EvaluationEnvironment |
getEvaluationEnvironment()
Obtains the evaluation environment that keeps track of variable values and knows how to call operations, navigate properties, etc. |
IdResolver |
getIdResolver()
|
DomainLogger |
getLogger()
Return the logger handling oclLog() invocations or null for none. |
MetaModelManager |
getMetaModelManager()
|
DomainModelManager |
getModelManager()
Obtains the mapping of model classes to their extents. |
org.eclipse.emf.common.util.Monitor |
getMonitor()
|
java.util.regex.Pattern |
getRegexPattern(java.lang.String regex)
Return a cached matcher for a give regular expression. |
DomainStandardLibrary |
getStandardLibrary()
|
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)
|
protected EvaluationVisitor |
getUndecoratedVisitor()
Obtains the visitor on which I perform nested Visitable#accept(org.eclipse.ocl.utilities.Visitor) calls. |
protected EvaluationVisitor |
getVisitor()
Deprecated. use getUndecoratedVisitor() |
boolean |
isCanceled()
Return true if the evaluation has been canceled. |
void |
setCanceled(boolean isCanceled)
Request cancelation of the current the evaluation, or reset the request for a new evaluation. |
void |
setLogger(DomainLogger logger)
Specify the logger to handle oclLog() invocations or null for none. |
void |
setMonitor(org.eclipse.emf.common.util.Monitor monitor)
|
void |
setUndecoratedVisitor(EvaluationVisitor evaluationVisitor)
Sets the visitor on which I perform nested Visitable#accept(org.eclipse.ocl.utilities.Visitor) calls. |
java.lang.String |
toString()
|
java.lang.Object |
visitConstraint(Constraint constraint)
This default implementation asserts that the constraint is boolean-valued if it is an invariant, pre-condition, or post-condition constraint and returns the value of its body expression by delegation to #visitExpression(OCLExpression). |
| Methods inherited from class org.eclipse.ocl.examples.pivot.util.AbstractVisitor |
|---|
getAdapter, safeVisit, visit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.ocl.examples.pivot.evaluation.EvaluationVisitor |
|---|
createNestedEvaluator, evaluate, evaluate, getEvaluator |
| Methods inherited from interface org.eclipse.ocl.examples.domain.evaluation.DomainEvaluator |
|---|
dispose |
| Field Detail |
|---|
@NonNull protected final EvaluationEnvironment evaluationEnvironment
@NonNull protected final Environment environment
@NonNull protected final MetaModelManager metaModelManager
@NonNull protected final DomainModelManager modelManager
@NonNull protected EvaluationVisitor undecoratedVisitor
@Nullable protected org.eclipse.emf.common.util.Monitor monitor
setMonitor(org.eclipse.emf.common.util.Monitor) to terminate execution at next iteration/operation call.
| Constructor Detail |
|---|
protected AbstractEvaluationVisitor(@NonNull
Environment env,
@NonNull
EvaluationEnvironment evalEnv,
@NonNull
DomainModelManager modelManager)
env - the current environmentevalEnv - an evaluation environment (map of variable names to values)modelManager - a map of classes to their instance sets| Method Detail |
|---|
@NonNull protected java.util.Map<java.lang.String,java.util.regex.Pattern> createRegexCache()
getRegexPattern(String)@NonNull public Environment getEnvironment()
EvaluationVisitor
getEnvironment in interface EvaluationVisitor@NonNull public EvaluationEnvironment getEvaluationEnvironment()
EvaluationVisitor
getEvaluationEnvironment in interface DomainEvaluatorgetEvaluationEnvironment in interface EvaluationVisitor@NonNull public IdResolver getIdResolver()
getIdResolver in interface DomainEvaluator@Nullable public DomainLogger getLogger()
DomainEvaluator
getLogger in interface DomainEvaluator@NonNull public MetaModelManager getMetaModelManager()
getMetaModelManager in interface EvaluationVisitor@NonNull public DomainModelManager getModelManager()
EvaluationVisitor
getModelManager in interface DomainEvaluatorgetModelManager in interface EvaluationVisitor@Nullable public org.eclipse.emf.common.util.Monitor getMonitor()
getMonitor in interface EvaluationVisitor
@NonNull
public java.util.regex.Pattern getRegexPattern(@NonNull
java.lang.String regex)
getRegexPattern in interface DomainEvaluator@NonNull public DomainStandardLibrary getStandardLibrary()
getStandardLibrary in interface DomainEvaluatorgetStandardLibrary in interface EvaluationVisitor
@NonNull
public DomainType getStaticTypeOf(@Nullable
java.lang.Object value)
getStaticTypeOf in interface DomainEvaluator
@NonNull
public DomainType getStaticTypeOf(@Nullable
java.lang.Object value,
@NonNull
java.lang.Object... values)
getStaticTypeOf in interface DomainEvaluator
@NonNull
public DomainType getStaticTypeOf(@Nullable
java.lang.Object value,
@NonNull
java.lang.Iterable<?> values)
getStaticTypeOf in interface DomainEvaluator@NonNull protected final EvaluationVisitor getUndecoratedVisitor()
Visitable#accept(org.eclipse.ocl.utilities.Visitor) calls. This
handles the case in which I am decorated by another visitor that must
intercept every visitXxx() method. If I internally just
recursively visit myself, then this decorator is cut out of the picture.
@Deprecated protected final EvaluationVisitor getVisitor()
getUndecoratedVisitor()
Visitable#accept(org.eclipse.ocl.utilities.Visitor) calls. This
handles the case in which I am decorated by another visitor that must
intercept every visitXxx() method. If I internally just
recursively visit myself, then this decorator is cut out of the picture.
public boolean isCanceled()
DomainEvaluator
isCanceled in interface DomainEvaluatorisCanceled in interface EvaluationVisitorpublic void setCanceled(boolean isCanceled)
DomainEvaluatorEvaluationHaltedException when #getValuefactory()
is next invoked.
setCanceled in interface DomainEvaluatorsetCanceled in interface EvaluationVisitor
public void setLogger(@Nullable
DomainLogger logger)
DomainEvaluator
setLogger in interface DomainEvaluator
public void setMonitor(@Nullable
org.eclipse.emf.common.util.Monitor monitor)
setMonitor in interface EvaluationVisitor
public void setUndecoratedVisitor(@NonNull
EvaluationVisitor evaluationVisitor)
Visitable#accept(org.eclipse.ocl.utilities.Visitor) calls.
setUndecoratedVisitor in interface EvaluationVisitorvisitor - my delegate visitorgetUndecoratedVisitor()public java.lang.String toString()
toString in class java.lang.Object
public java.lang.Object visitConstraint(@NonNull
Constraint constraint)
#visitExpression(OCLExpression).
visitConstraint in interface Visitor<java.lang.Object>visitConstraint in class AbstractExtendingVisitor<java.lang.Object,java.lang.Object>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||