com.evelopers.unimod.validation
Class ValidationMessenger

java.lang.Object
  extended bycom.evelopers.unimod.validation.ValidationMessenger
All Implemented Interfaces:
CompletenessListener, ConsistencyListener, StructureListener

public class ValidationMessenger
extends java.lang.Object
implements StructureListener, ConsistencyListener, CompletenessListener

Implements all validation listeners and messages about validation events to PrintStream. Default PrintStream is System.out.


Field Summary
(package private)  java.io.PrintStream out
           
 
Constructor Summary
ValidationMessenger()
           
ValidationMessenger(java.io.PrintStream out)
           
 
Method Summary
 void badTransitionFromInitState(StateMachine sm, Transition transition)
          Called when transition from init state has trigger event or guard condition.
 void incomingTransitionToInitState(StateMachine sm, Transition transition)
          Called when there is incoming transition to init state.
 void incompleteGuardSet(StateMachine sm, State state, Event event, Guard guard)
          CallBack.
 void inconsistentGuardSet(StateMachine sm, Transition t1, Transition t2, Guard guard)
          CallBack.
 void noEventOnTransition(StateMachine sm, Transition transition)
          Called when there is no event on transition from non-init state
 void noInitState(StateMachine sm, State state)
          Is called when composite attainable state without initial state is found.
 void noTransitionFromInitState(StateMachine sm, State initState)
          Called when there is no transition from init state.
 void notRootStateMachineHasEventProviders(StateMachine sm)
          Called when not root state machine has associated event providers that is prohibited.
 void outgoingTransitionFromFinalState(StateMachine sm, Transition transition)
          Called when there is outgoing transition from final state.
 void redundantElseTransitions(StateMachine sm, State state, Event e, int elseTransitionsNumber)
           
 void redundantInitStates(StateMachine sm, State state, int initStatesNumber)
          Is called when attainable composite state has more then one initial state.
 void redundantTransitionsFromInitState(StateMachine sm, State initState, int transitionsNumber)
          Called when there is more then one transition from init state.
 void unattainableState(StateMachine sm, State state)
          CallBack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

java.io.PrintStream out
Constructor Detail

ValidationMessenger

public ValidationMessenger()

ValidationMessenger

public ValidationMessenger(java.io.PrintStream out)
Method Detail

noInitState

public void noInitState(StateMachine sm,
                        State state)
Description copied from interface: StructureListener
Is called when composite attainable state without initial state is found.

Specified by:
noInitState in interface StructureListener
Parameters:
state - composite state without initial state.
sm - state machine that contains this state.

redundantInitStates

public void redundantInitStates(StateMachine sm,
                                State state,
                                int initStatesNumber)
Description copied from interface: StructureListener
Is called when attainable composite state has more then one initial state.

Specified by:
redundantInitStates in interface StructureListener
Parameters:
state - composite state that has more then one initial state
sm - state machine that contains this state.
initStatesNumber -

unattainableState

public void unattainableState(StateMachine sm,
                              State state)
Description copied from interface: StructureListener
CallBack. Is called when unattainable state is found.

Specified by:
unattainableState in interface StructureListener
Parameters:
state - unattainable state.
sm - StateMachine that contains state.

incompleteGuardSet

public void incompleteGuardSet(StateMachine sm,
                               State state,
                               Event event,
                               Guard guard)
Description copied from interface: CompletenessListener
CallBack. This method is invoked when incomplete guard conditions set is found.

Specified by:
incompleteGuardSet in interface CompletenessListener
Parameters:
state - source state of transitions with incomplete guard conditions set.
event - on transitions with incomplete guard conditions set.
guard - residue of the guard conditions set. If transition from the state on event with this guard is added then guard conditions set will became complete.

inconsistentGuardSet

public void inconsistentGuardSet(StateMachine sm,
                                 Transition t1,
                                 Transition t2,
                                 Guard guard)
Description copied from interface: ConsistencyListener
CallBack. This method is invoked when inconsistent transition pair is found.

Specified by:
inconsistentGuardSet in interface ConsistencyListener
Parameters:
sm - StateMachine that contains these transitions.
t1 - first Transition in pair.
t2 - second Transition in pair.
guard - intersection of the guards on transitions t1, t2. If guard on the t1 xor t2 are conjunced with guard the guard conditions set will became consistent.

redundantElseTransitions

public void redundantElseTransitions(StateMachine sm,
                                     State state,
                                     Event e,
                                     int elseTransitionsNumber)
Specified by:
redundantElseTransitions in interface ConsistencyListener

notRootStateMachineHasEventProviders

public void notRootStateMachineHasEventProviders(StateMachine sm)
Description copied from interface: StructureListener
Called when not root state machine has associated event providers that is prohibited.

Specified by:
notRootStateMachineHasEventProviders in interface StructureListener
Parameters:
sm -

badTransitionFromInitState

public void badTransitionFromInitState(StateMachine sm,
                                       Transition transition)
Description copied from interface: StructureListener
Called when transition from init state has trigger event or guard condition.

Specified by:
badTransitionFromInitState in interface StructureListener
Parameters:
sm -

noTransitionFromInitState

public void noTransitionFromInitState(StateMachine sm,
                                      State initState)
Description copied from interface: StructureListener
Called when there is no transition from init state.

Specified by:
noTransitionFromInitState in interface StructureListener

redundantTransitionsFromInitState

public void redundantTransitionsFromInitState(StateMachine sm,
                                              State initState,
                                              int transitionsNumber)
Description copied from interface: StructureListener
Called when there is more then one transition from init state.

Specified by:
redundantTransitionsFromInitState in interface StructureListener

incomingTransitionToInitState

public void incomingTransitionToInitState(StateMachine sm,
                                          Transition transition)
Description copied from interface: StructureListener
Called when there is incoming transition to init state.

Specified by:
incomingTransitionToInitState in interface StructureListener

outgoingTransitionFromFinalState

public void outgoingTransitionFromFinalState(StateMachine sm,
                                             Transition transition)
Description copied from interface: StructureListener
Called when there is outgoing transition from final state.

Specified by:
outgoingTransitionFromFinalState in interface StructureListener

noEventOnTransition

public void noEventOnTransition(StateMachine sm,
                                Transition transition)
Description copied from interface: StructureListener
Called when there is no event on transition from non-init state

Specified by:
noEventOnTransition in interface StructureListener