org.eclipse.ocl.examples.impactanalyzer.instanceScope
Class AllInstancesNavigationStep

java.lang.Object
  extended by org.eclipse.ocl.examples.impactanalyzer.instanceScope.AbstractNavigationStep
      extended by org.eclipse.ocl.examples.impactanalyzer.instanceScope.AllInstancesNavigationStep
All Implemented Interfaces:
NavigationStep, SemanticComparable

public class AllInstancesNavigationStep
extends AbstractNavigationStep


Constructor Summary
AllInstancesNavigationStep(org.eclipse.emf.ecore.EClass sourceType, org.eclipse.emf.ecore.EClass targetType, OCLExpression debugInfo, OppositeEndFinder oppositeEndFinder)
          Constructs a non-absolute navigation step that computes all instances of targetType and all its direct and indirect subtypes, if the fromObject passed to AbstractNavigationStep.navigate(Set, TracebackCache, Notification) conforms to the sourceType.
 
Method Summary
 java.lang.String contentToString(java.util.Map<NavigationStep,java.lang.Integer> visited, int indent)
           
 boolean isAbsolute()
          Always returns false.
protected  java.util.Set<AnnotatedEObject> navigate(AnnotatedEObject fromObject, TracebackCache cache, org.eclipse.emf.common.notify.Notification changeEvent)
           
 
Methods inherited from class org.eclipse.ocl.examples.impactanalyzer.instanceScope.AbstractNavigationStep
addAlwaysEmptyChangeListener, addEnteringScopes, addExpressionForWhichThisIsNavigationStep, addHashCodeChangeListener, addLeavingScopes, addSourceTypeChangeListener, addTargetTypeChangeListener, annotateEObject, distinctSize, distinctSize, doesSourceTypeMatch, fireAfterHashCodeChange, fireBeforeHashCodeChange, getDebugInfo, getEnteringScopes, getId, getLeavingScopes, getNavigateCounter, getResultObjectsCounter, getSemanticIdentity, getSourceType, getTargetType, haveIntersectingSubclassTree, incrementNavigateCounter, isAlwaysEmpty, navigate, newTokenForFiringHashCodeChangeEvent, setAlwaysEmpty, size, size, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AllInstancesNavigationStep

public AllInstancesNavigationStep(org.eclipse.emf.ecore.EClass sourceType,
                                  org.eclipse.emf.ecore.EClass targetType,
                                  OCLExpression debugInfo,
                                  OppositeEndFinder oppositeEndFinder)
Constructs a non-absolute navigation step that computes all instances of targetType and all its direct and indirect subtypes, if the fromObject passed to AbstractNavigationStep.navigate(Set, TracebackCache, Notification) conforms to the sourceType. Otherwise, an empty set is returned. The consideration of the fromObject is the reason why if constructed with this constructor an object of this class is not absolute.

Parameters:
debugInfo -
oppositeEndFinder - used during partial evaluation and for metamodel queries, e.g., finding opposite role names, or finding all subclasses of a class; as well as for obtaining all instances of a type while performing an AllInstancesNavigationStep. It is handed to the PathCache object from where Tracers can retrieve it using AbstractPathCache.getOppositeEndFinder().
Method Detail

navigate

protected java.util.Set<AnnotatedEObject> navigate(AnnotatedEObject fromObject,
                                                   TracebackCache cache,
                                                   org.eclipse.emf.common.notify.Notification changeEvent)
Specified by:
navigate in class AbstractNavigationStep

contentToString

public java.lang.String contentToString(java.util.Map<NavigationStep,java.lang.Integer> visited,
                                        int indent)
Overrides:
contentToString in class AbstractNavigationStep

isAbsolute

public boolean isAbsolute()
Always returns false. See AllInstancesNavigationStep(EClass, EClass, OCLExpression, OppositeEndFinder)

Specified by:
isAbsolute in interface NavigationStep
Overrides:
isAbsolute in class AbstractNavigationStep
Returns:
always false