org.eclipse.ocl.ecore.utilities
Class AbstractVisitor<T>

java.lang.Object
  extended by org.eclipse.ocl.utilities.AbstractVisitor<T,org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EEnumLiteral,org.eclipse.emf.ecore.EParameter,org.eclipse.emf.ecore.EObject,CallOperationAction,SendSignalAction,Constraint>
      extended by org.eclipse.ocl.ecore.utilities.AbstractVisitor<T>
All Implemented Interfaces:
VisitorExtension<T>, Visitor<T,org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EEnumLiteral,org.eclipse.emf.ecore.EParameter,org.eclipse.emf.ecore.EObject,CallOperationAction,SendSignalAction,Constraint>
Direct Known Subclasses:
ContextTypeRetriever

public class AbstractVisitor<T>
extends AbstractVisitor<T,org.eclipse.emf.ecore.EClassifier,org.eclipse.emf.ecore.EOperation,org.eclipse.emf.ecore.EStructuralFeature,org.eclipse.emf.ecore.EEnumLiteral,org.eclipse.emf.ecore.EParameter,org.eclipse.emf.ecore.EObject,CallOperationAction,SendSignalAction,Constraint>
implements VisitorExtension<T>

Mixes in the VisitorExtension interface and provides a default implementation for OppositePropertyCallExp.

Since:
3.1

Field Summary
 
Fields inherited from class org.eclipse.ocl.utilities.AbstractVisitor
result
 
Constructor Summary
protected AbstractVisitor()
          Initializes me.
protected AbstractVisitor(T result)
          Initializes me with an initial value for my result.
 
Method Summary
protected  T handleOppositePropertyCallExp(OppositePropertyCallExp callExp, T sourceResult)
          Visits the specified opposite property call with the results of visiting its source and qualifiers (if any).
 T visitOppositePropertyCallExp(OppositePropertyCallExp callExp)
          Visits the opposite property-call source.
 
Methods inherited from class org.eclipse.ocl.utilities.AbstractVisitor
getSpecification, handleAssociationClassCallExp, handleCollectionItem, handleCollectionLiteralExp, handleCollectionRange, handleConstraint, handleExpressionInOCL, handleIfExp, handleIterateExp, handleIteratorExp, handleLetExp, handleMessageExp, handleOperationCallExp, handlePropertyCallExp, handleTupleLiteralExp, handleTupleLiteralPart, handleVariable, safeVisit, visitAssociationClassCallExp, visitBooleanLiteralExp, visitCollectionItem, visitCollectionLiteralExp, visitCollectionRange, visitConstraint, visitEnumLiteralExp, visitExpressionInOCL, visitIfExp, visitIntegerLiteralExp, visitInvalidLiteralExp, visitIterateExp, visitIteratorExp, visitLetExp, visitMessageExp, visitNullLiteralExp, visitOperationCallExp, visitPropertyCallExp, visitRealLiteralExp, visitStateExp, visitStringLiteralExp, visitTupleLiteralExp, visitTupleLiteralPart, visitTypeExp, visitUnlimitedNaturalLiteralExp, visitUnspecifiedValueExp, visitVariable, visitVariableExp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractVisitor

protected AbstractVisitor()
Initializes me.


AbstractVisitor

protected AbstractVisitor(T result)
Initializes me with an initial value for my result.

Parameters:
initialValue - my initial result value
Method Detail

visitOppositePropertyCallExp

public T visitOppositePropertyCallExp(OppositePropertyCallExp callExp)
Visits the opposite property-call source. No qualifiers are visited as these calls are not expected for UML but only for Ecore. Returns the result of handleOppositePropertyCallExp(OppositePropertyCallExp, Object).

Specified by:
visitOppositePropertyCallExp in interface VisitorExtension<T>
Since:
3.1

handleOppositePropertyCallExp

protected T handleOppositePropertyCallExp(OppositePropertyCallExp callExp,
                                          T sourceResult)
Visits the specified opposite property call with the results of visiting its source and qualifiers (if any). Note that in the case of a opposite property call expression as a qualifier of an association class call, the opposite property call does not have a source and, therefore, the sourceResult will be null in that case.

Parameters:
callExp - the opposite property call expression
sourceResult - the result of visiting the expression's source
Returns:
the accumulated AbstractVisitor.result, by default
Since:
3.1
See Also:
visitOppositePropertyCallExp(OppositePropertyCallExp)