class PrepareTransition
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| (package private) java.util.ArrayList<StateSimple> | dstStatesThe destination states filled with  buildDstStates()with the length of#dst. | 
| (package private) StateSimple[] | exitStates | 
| (package private) int[] | ixInStatePathThe current indices in  dstStates. | 
| (package private) StateSimple | state | 
| (package private) StateSimple.Trans | trans | 
| static java.lang.String | versionVersion, history and license. | 
| Constructor and Description | 
|---|
| PrepareTransition(StateSimple state,
                 StateSimple.Trans trans,
                 StateSimple[] exitStates)Current index to write  Trans#entryStatesOld. | 
| Modifier and Type | Method and Description | 
|---|---|
| private void | buildDstStates() | 
| private void | buildEntryStates()Builds the  Trans#entryStateswith given found common state and givenTrans#dstStatesand theirStateSimple.statePath. | 
| private void | buildExitPath() | 
| private void | checkDefaultAddDstState(StateSimple dstState,
                       int recurs)Checks the given state whether it is a CompositeStateFlat or ParallelState and stores the leaf (only StateSimple) state
 in  dstStates. | 
| private void | createJoinTransitionInTheFirstJoinState()Completes a join transition with the found in a  StateParallelwith all necessary exit states from all join source states
 and enters the instance of a join transition in all join source state'sStateSimple#transJoins. | 
| (package private) void | execute() | 
| private void | searchOrCreateTimerEvent()Gets the timeout event from the top state or the  StateParallelor creates that event. | 
| private void | searchStateCommon()Searches the common state between all  dstStatesand the source state. | 
public static final java.lang.String version
buildDstStates() regards a non-leaf state, uses the stateDefault. 
 StateSimple.
 final StateSimple.Trans trans
final StateSimple state
final java.util.ArrayList<StateSimple> dstStates
buildDstStates() with the length of #dst.
 Left null if no dst states are given, especially on existing Trans#choice.final StateSimple[] exitStates
int[] ixInStatePath
dstStates.StateSimple.statePath while evaluating the entry path.PrepareTransition(StateSimple state, StateSimple.Trans trans, StateSimple[] exitStates)
Trans#entryStatesOld. Pre-increment.void execute()
private void buildDstStates()
private void checkDefaultAddDstState(StateSimple dstState, int recurs)
dstStates. On a StateCompositeFlat its StateCompositeFlat.stateDefault will be used as destination.
 On a StateParallel all StateParallel.aParallelstates where checked and taken as destination. If a destination state
 is not a leaf state, this routine is invoked recursively.dstState - given destination state of a transition.recurs - Counter for recursive call. It prevents faulty deep recursion. Aborted on 100 with an IllegalArgumentException.private void searchStateCommon()
dstStates and the source state.
 All states till the common state should be exited. All states from the common state should be entered.
 As result the ixInStatePath is set with the index after the found stateCommonprivate void buildExitPath()
private void createJoinTransitionInTheFirstJoinState()
StateParallel with all necessary exit states from all join source states
 and enters the instance of a join transition in all join source state's StateSimple#transJoins.
 Before this operation was called, the Trans#exitStates contains only that exit states from that state
 which defines the TransJoin. But the exit states form all source states are necessary.trans - The found join transition in a parallel state.private void buildEntryStates()
Trans#entryStates with given found common state and given Trans#dstStates and their StateSimple.statePath.
 The first entry state is the StateSimple.statePath[ixInStatePath[0]], the first entry state of the first fork-branch.
 Then the ixInStatePath[..] is incremented for all fork-branches. All states are written in Trans#entryStates parallel for all branches
 but states there are the same in the branches are not written twice. Example see Trans#entryStates.private void searchOrCreateTimerEvent()
StateParallel 
 or creates that event.
 All non-parallel states need only one timeout event instance because only one of them is used.