if (processedTransitions.contains(transition))
{
return;
}
processedTransitions.add(transition);
final StateVertexFacade target = transition.getTarget();
if (target instanceof FrontEndView || target instanceof FrontEndFinalState)
{
if (!this.actionForwards.containsKey(transition.getTarget()))
{
this.actionForwards.put(
transition.getTarget(),
transition);
}
}
else if (target instanceof PseudostateFacade && ((PseudostateFacade)target).isDecisionPoint())
{
this.decisionTransitions.add(transition);
final Collection outcomes = target.getOutgoing();
for (final Iterator iterator = outcomes.iterator(); iterator.hasNext();)
{
final TransitionFacade outcome = (TransitionFacade)iterator.next();
collectTransitions(
outcome,
processedTransitions);
}
}
else if (target instanceof FrontEndActionState)
{
this.actionStates.add(target);
final FrontEndForward forward = ((FrontEndActionState)target).getForward();
if (forward != null)
{
collectTransitions(
forward,
processedTransitions);
}
}
else // all the rest is ignored but outgoing transitions are further processed
{
final Collection outcomes = target.getOutgoing();
for (final Iterator iterator = outcomes.iterator(); iterator.hasNext();)
{
final TransitionFacade outcome = (TransitionFacade)iterator.next();
collectTransitions(
outcome,