org.eclipse.ocl.examples.pivot.evaluation
Interface EvaluationVisitor

All Superinterfaces:
DomainEvaluator, Visitor<java.lang.Object>
All Known Implementing Classes:
AbstractEvaluationVisitor, AbstractEvaluationVisitorDecorator, EvaluationVisitorDecorator, EvaluationVisitorImpl, OCLConsolePage.CancelableEvaluationVisitor, TracingEvaluationVisitor

public interface EvaluationVisitor
extends Visitor<java.lang.Object>, DomainEvaluator

A specialized visitor that is used for evaluation an OCL expression by walking its AST.

See the Environment class for a description of the generic type parameters of this class.


Method Summary
 EvaluationVisitor createNestedEvaluator()
           
 java.lang.Object evaluate(DomainExpression body)
           
 java.lang.Object evaluate(ExpressionInOCL expressionInOCL)
           
 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.
 EvaluationVisitor getEvaluator()
           
 MetaModelManager getMetaModelManager()
           
 DomainModelManager getModelManager()
          Obtains the mapping of model classes to their extents.
 DomainStandardLibrary getStandardLibrary()
           
 void setUndecoratedVisitor(EvaluationVisitor evaluationVisitor)
          Configures the specified decorated visitor to correctly handle the invocation of recursive visitXxx(...) calls.
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.util.Visitor
getAdapter, visitAnnotation, visitAnyType, visitAssociationClass, visitAssociationClassCallExp, visitBagType, visitBehavior, visitBooleanLiteralExp, visitCallExp, visitCallOperationAction, visitClass, visitCollectionItem, visitCollectionLiteralExp, visitCollectionLiteralPart, visitCollectionRange, visitCollectionType, visitComment, visitConnectionPointReference, visitConstraint, visitConstructorExp, visitConstructorPart, visitDataType, visitDetail, visitDynamicElement, visitDynamicProperty, visitDynamicType, visitElement, visitElementExtension, visitEnumeration, visitEnumerationLiteral, visitEnumLiteralExp, visitExpressionInOCL, visitFeature, visitFeatureCallExp, visitFinalState, visitIfExp, visitImport, visiting, visitIntegerLiteralExp, visitInvalidLiteralExp, visitInvalidType, visitIterateExp, visitIteration, visitIteratorExp, visitLambdaType, visitLetExp, visitLibrary, visitLiteralExp, visitLoopExp, visitMessageExp, visitMessageType, visitMetaclass, visitNamedElement, visitNamespace, visitNavigationCallExp, visitNullLiteralExp, visitNumericLiteralExp, visitOCLExpression, visitOpaqueExpression, visitOperation, visitOperationCallExp, visitOperationTemplateParameter, visitOrderedSetType, visitPackage, visitPackageableElement, visitParameter, visitParameterableElement, visitPrecedence, visitPrimitiveLiteralExp, visitPrimitiveType, visitProfile, visitProperty, visitPropertyCallExp, visitPseudostate, visitRealLiteralExp, visitRegion, visitRoot, visitSelfType, visitSendSignalAction, visitSequenceType, visitSetType, visitSignal, visitState, visitStateExp, visitStateMachine, visitStereotype, visitStringLiteralExp, visitTemplateableElement, visitTemplateBinding, visitTemplateParameter, visitTemplateParameterSubstitution, visitTemplateParameterType, visitTemplateSignature, visitTransition, visitTrigger, visitTupleLiteralExp, visitTupleLiteralPart, visitTupleType, visitType, visitTypedElement, visitTypedMultiplicityElement, visitTypeExp, visitTypeTemplateParameter, visitUnlimitedNaturalLiteralExp, visitUnspecifiedType, visitUnspecifiedValueExp, visitValueSpecification, visitVariable, visitVariableDeclaration, visitVariableExp, visitVertex, visitVoidType
 
Methods inherited from interface org.eclipse.ocl.examples.domain.evaluation.DomainEvaluator
getIdResolver, getLogger, getStaticTypeOf, getStaticTypeOf, getStaticTypeOf, isCanceled, setCanceled, setLogger
 

Method Detail

createNestedEvaluator

@NonNull
EvaluationVisitor createNestedEvaluator()
Specified by:
createNestedEvaluator in interface DomainEvaluator

evaluate

@Nullable
java.lang.Object evaluate(@NonNull
                                   DomainExpression body)
Specified by:
evaluate in interface DomainEvaluator

evaluate

@Nullable
java.lang.Object evaluate(@NonNull
                                   ExpressionInOCL expressionInOCL)

getEnvironment

Environment getEnvironment()
Obtains the environment that provides the metamodel semantics for the expression to be evaluated.

Returns:
the environment

getEvaluationEnvironment

@NonNull
EvaluationEnvironment getEvaluationEnvironment()
Obtains the evaluation environment that keeps track of variable values and knows how to call operations, navigate properties, etc.

Specified by:
getEvaluationEnvironment in interface DomainEvaluator
Returns:
the evaluation environment

getEvaluator

@NonNull
EvaluationVisitor getEvaluator()

getModelManager

@NonNull
DomainModelManager getModelManager()
Obtains the mapping of model classes to their extents.

Specified by:
getModelManager in interface DomainEvaluator
Returns:
the model manager

getMetaModelManager

@NonNull
MetaModelManager getMetaModelManager()

getStandardLibrary

@NonNull
DomainStandardLibrary getStandardLibrary()
Specified by:
getStandardLibrary in interface DomainEvaluator

setUndecoratedVisitor

void setUndecoratedVisitor(@NonNull
                           EvaluationVisitor evaluationVisitor)
Configures the specified decorated visitor to correctly handle the invocation of recursive visitXxx(...) calls. In particular, the tail of a chain of decorators is informed (if it is an AbstractEvaluationVisitor of the head decorator of the chain, so that recursive visitation follows the entire decorator chain at every step.

Parameters:
decorator - the decorator that is not decorated/