|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.evelopers.unimod.validation.ConsistencyCheckVisitor com.evelopers.unimod.validation.ConsistencyValidator
Validates consistency (every state has consistent system of transitions for every event).
Constructor Summary | |
(package private) |
ConsistencyValidator()
|
Method Summary | |
boolean |
addConsistencyListener(ConsistencyListener listener)
Adds listener to list of consistency listeners. |
protected void |
checkState(State s)
Checks consistency of State s. |
protected void |
fireInconsistentGuardSet(StateMachine sm,
Transition t1,
Transition t2,
Guard guard)
|
protected void |
fireRedundantElseTransitions(StateMachine sm,
State state,
Event e,
int elseTransitionsNumber)
|
boolean |
removeConsistencyListener(ConsistencyListener listener)
Removes listener from list of consistency listeners. |
void |
setSm(StateMachine sm)
|
void |
validateConsistency(StateMachine sm)
Checks if every state has consistent pairs of transitions, i.e. any combination of input actions and event will meet guard condition only on the one transition. |
void |
validateConsistency(StateMachine sm,
State state)
|
boolean |
visit(ModelElement e)
Checks consistency of e and its descendants. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
ConsistencyValidator()
Method Detail |
public boolean addConsistencyListener(ConsistencyListener listener)
listener
to list of consistency listeners.
listener
- listener to add
ConsistencyListener
public boolean removeConsistencyListener(ConsistencyListener listener)
listener
from list of consistency listeners.
listener
- listener to remove.
listener
.ConsistencyListener
public void validateConsistency(StateMachine sm)
state
sm
- StateMachine
to validate.public void validateConsistency(StateMachine sm, State state)
protected void fireInconsistentGuardSet(StateMachine sm, Transition t1, Transition t2, Guard guard)
fireInconsistentGuardSet
in class ConsistencyCheckVisitor
protected void fireRedundantElseTransitions(StateMachine sm, State state, Event e, int elseTransitionsNumber)
fireRedundantElseTransitions
in class ConsistencyCheckVisitor
public void setSm(StateMachine sm)
public boolean visit(ModelElement e) throws VisitorException
e
and its descendants. e
should be instance of State
.
visit
in interface ModelVisitor
e
- state to visit.
e
is composite state and thus whether its
descendants should be checked.
VisitorException
- if e
or its descendants aren't
instances of type State
.protected void checkState(State s) throws VisitorException
State
s.
s
- state, consistency of what should be checked.
VisitorException
- if any error occurs.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |