|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ocl.examples.impactanalyzer.instanceScope.AbstractNavigationStep
org.eclipse.ocl.examples.impactanalyzer.instanceScope.IndirectingStep
public class IndirectingStep
Steps of this type can be an empty placeholder during the analysis phase and can
be filled in later, e.g., pointing to a real NavigationStep
. All fields are
initialized with null by the constructor. Clients have to ensure that
a valid state is achieved before leaving the analysis phase and using this step.
An indirecting step listens for changes of its actual step's hash code. See
HashCodeChangeListener
. Changes to the actual step's hash code are forwarded to this
step's hash code change listeners.
Nested Class Summary | |
---|---|
class |
IndirectingStep.IndirectingStepSemanticIdentity
|
Constructor Summary | |
---|---|
IndirectingStep(OCLExpression debugInfo)
|
Method Summary | |
---|---|
void |
afterHashCodeChange(NavigationStep step,
int token)
Called after the step 's SemanticIdentity hash code has changed. |
void |
beforeHashCodeChange(NavigationStep step,
int token)
Invoked before step 's SemanticIdentity changes its hash code. |
java.lang.String |
contentToString(java.util.Map<NavigationStep,java.lang.Integer> visited,
int indent)
|
protected int |
distinctSize(java.util.Set<SemanticIdentity> visited)
|
NavigationStep |
getActualStep()
|
InstanceScopeAnalysis |
getInstanceScopeAnalysis()
|
SemanticIdentity |
getSemanticIdentity()
|
protected void |
incrementNavigateCounter(java.util.Set<AnnotatedEObject> from)
Overrides incrementNavigateCounter to suppress counting of additional navigate() call in case of a recursion |
boolean |
isAbsolute()
By default, navigation steps depend on the object set to which they are applied. |
protected java.util.Set<AnnotatedEObject> |
navigate(AnnotatedEObject fromObject,
TracebackCache cache,
org.eclipse.emf.common.notify.Notification changeEvent)
|
void |
setActualStep(NavigationStep actualStep)
|
protected int |
size(java.util.Set<NavigationStep> visited)
An indirecting step 1. |
Methods inherited from class org.eclipse.ocl.examples.impactanalyzer.instanceScope.AbstractNavigationStep |
---|
addAlwaysEmptyChangeListener, addEnteringScopes, addExpressionForWhichThisIsNavigationStep, addHashCodeChangeListener, addLeavingScopes, addSourceTypeChangeListener, addTargetTypeChangeListener, annotateEObject, distinctSize, doesSourceTypeMatch, fireAfterHashCodeChange, fireBeforeHashCodeChange, getDebugInfo, getEnteringScopes, getId, getLeavingScopes, getNavigateCounter, getResultObjectsCounter, getSourceType, getTargetType, haveIntersectingSubclassTree, isAlwaysEmpty, navigate, newTokenForFiringHashCodeChangeEvent, setAlwaysEmpty, size, toString, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IndirectingStep(OCLExpression debugInfo)
Method Detail |
---|
public void setActualStep(NavigationStep actualStep)
public NavigationStep getActualStep()
protected java.util.Set<AnnotatedEObject> navigate(AnnotatedEObject fromObject, TracebackCache cache, org.eclipse.emf.common.notify.Notification changeEvent)
navigate
in class AbstractNavigationStep
protected void incrementNavigateCounter(java.util.Set<AnnotatedEObject> from)
incrementNavigateCounter
in class AbstractNavigationStep
public boolean isAbsolute()
AbstractNavigationStep
isAbsolute
in interface NavigationStep
isAbsolute
in class AbstractNavigationStep
public java.lang.String contentToString(java.util.Map<NavigationStep,java.lang.Integer> visited, int indent)
contentToString
in class AbstractNavigationStep
protected int size(java.util.Set<NavigationStep> visited)
size
in class AbstractNavigationStep
public void beforeHashCodeChange(NavigationStep step, int token)
HashCodeChangeListener
step
's SemanticIdentity
changes its hash code. When this method is called for a step,
the HashCodeChangeListener.afterHashCodeChange(NavigationStep, int)
is guaranteed to be called on the same listener later, immediately
after the hash code has changed. Receiving this call gives the receiver the opportunity to remove the step from hashed
structures in order to re-insert it later when the hash code has assumed the new value.
beforeHashCodeChange
in interface HashCodeChangeListener
token
- a token value identifying the root cause of the change by a monotonously-increasing number. This can be used in
cyclic NavigationStep
graphs to decide that a root cause has already been handled by a listener when it
comes by a second time.public void afterHashCodeChange(NavigationStep step, int token)
HashCodeChangeListener
step
's SemanticIdentity
hash code has changed. This gives hash structures the
opportunity to enter the step again.
afterHashCodeChange
in interface HashCodeChangeListener
token
- a token value identifying the root cause of the change by a monotonously-increasing number. This can be used in
cyclic NavigationStep
graphs to decide that a root cause has already been handled by a listener when it
comes by a second time.protected int distinctSize(java.util.Set<SemanticIdentity> visited)
distinctSize
in class AbstractNavigationStep
public SemanticIdentity getSemanticIdentity()
getSemanticIdentity
in interface SemanticComparable
getSemanticIdentity
in class AbstractNavigationStep
public InstanceScopeAnalysis getInstanceScopeAnalysis()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |