|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.ocl.examples.impactanalyzer.instanceScope.AbstractNavigationStep org.eclipse.ocl.examples.impactanalyzer.instanceScope.CompositeNavigationStep
public abstract class CompositeNavigationStep
A navigation step that branches in several paths and combines the results into one. As hashCode and equals
depend on the subordinate steps, steps of this class register as HashCodeChangeListener
on each
contained step and propagate the event correspondingly. The hash code combination for the subordinate
steps, once computed, is cached and updated when subordinate steps send hash code change events.
Constructor Summary | |
---|---|
CompositeNavigationStep(org.eclipse.emf.ecore.EClass sourceType,
org.eclipse.emf.ecore.EClass targetType,
OCLExpression debugInfo,
NavigationStep... steps)
|
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. |
protected int |
distinctSize(java.util.Set<SemanticIdentity> visited)
|
InstanceScopeAnalysis |
getInstanceScopeAnalysis()
|
SemanticIdentity |
getSemanticIdentity()
|
protected SemanticIdentity |
getSemanticIdentityOfAbstractNavigationStep()
|
NavigationStep[] |
getSteps()
|
protected int |
size(java.util.Set<NavigationStep> visited)
The default size in particular for atomic navigation steps is 1. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CompositeNavigationStep(org.eclipse.emf.ecore.EClass sourceType, org.eclipse.emf.ecore.EClass targetType, OCLExpression debugInfo, NavigationStep... steps)
Method Detail |
---|
protected SemanticIdentity getSemanticIdentityOfAbstractNavigationStep()
public NavigationStep[] getSteps()
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 size(java.util.Set<NavigationStep> visited)
size
in class AbstractNavigationStep
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 |