org.eclipse.ocl.examples.impactanalyzer.instanceScope
Interface HashCodeChangeListener

All Known Implementing Classes:
BranchingNavigationStep, CompositeNavigationStep, IndirectingStep, NavigationStepSequence, PathCache

public interface HashCodeChangeListener


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.
 

Method Detail

beforeHashCodeChange

void beforeHashCodeChange(NavigationStep step,
                          int token)
Invoked before step's SemanticIdentity changes its hash code. When this method is called for a step, the 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.

Parameters:
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.

afterHashCodeChange

void afterHashCodeChange(NavigationStep step,
                         int token)
Called after the step's SemanticIdentity hash code has changed. This gives hash structures the opportunity to enter the step again.

Parameters:
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.