|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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
|
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 | |
---|---|
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. |
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 |
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 |
Field Detail |
---|
@NonNull protected final EvaluationEnvironment evaluationEnvironment
@NonNull protected final Environment environment
@NonNull protected final MetaModelManager metaModelManager
@NonNull protected final DomainModelManager modelManager
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 setsMethod Detail |
---|
@NonNull public Environment getEnvironment()
EvaluationVisitor
getEnvironment
in interface EvaluationVisitor
@NonNull public EvaluationEnvironment getEvaluationEnvironment()
EvaluationVisitor
getEvaluationEnvironment
in interface DomainEvaluator
getEvaluationEnvironment
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 DomainEvaluator
getModelManager
in interface EvaluationVisitor
@NonNull public DomainStandardLibrary getStandardLibrary()
getStandardLibrary
in interface DomainEvaluator
getStandardLibrary
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 DomainEvaluator
public void setCanceled(boolean isCanceled)
DomainEvaluator
EvaluationHaltedException
when #getValuefactory()
is next invoked.
setCanceled
in interface DomainEvaluator
public void setLogger(@Nullable DomainLogger logger)
DomainEvaluator
setLogger
in interface DomainEvaluator
public void setUndecoratedVisitor(@NonNull EvaluationVisitor evaluationVisitor)
Visitable#accept(org.eclipse.ocl.utilities.Visitor)
calls.
setUndecoratedVisitor
in interface EvaluationVisitor
visitor
- 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 |