com.evelopers.unimod.validation
Class ConsistencyCheckVisitor
java.lang.Object
com.evelopers.unimod.validation.ConsistencyCheckVisitor
- All Implemented Interfaces:
- ModelVisitor
- Direct Known Subclasses:
- ConsistencyValidator
- abstract class ConsistencyCheckVisitor
- extends java.lang.Object
- implements ModelVisitor
Visits every state and checks consistency of guard conditions set.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConsistencyCheckVisitor
ConsistencyCheckVisitor()
setSm
public void setSm(StateMachine sm)
visit
public boolean visit(ModelElement e)
throws VisitorException
- Checks consistency of
e
and its descendants. e
should be instance of State
.
- Specified by:
visit
in interface ModelVisitor
- Parameters:
e
- state to visit.
- Returns:
- Whether
e
is composite state and thus whether its
descendants should be checked.
- Throws:
VisitorException
- if e
or its descendants aren't
instances of type State
.
checkState
protected void checkState(State s)
throws VisitorException
- Checks consistency of
State
s.
- Parameters:
s
- state, consistency of what should be checked.
- Throws:
VisitorException
- if any error occurs.
fireInconsistentGuardSet
protected abstract void fireInconsistentGuardSet(StateMachine sm,
Transition t1,
Transition t2,
Guard guard)
fireRedundantElseTransitions
protected abstract void fireRedundantElseTransitions(StateMachine sm,
State state,
Event e,
int elseTransitionsNumber)