de.matthias_burbach.flux
Class DefaultModelChecker
java.lang.Object
  
de.matthias_burbach.flux.DefaultModelChecker
- All Implemented Interfaces: 
 - ModelChecker
 
- public class DefaultModelChecker
- extends java.lang.Object
- implements ModelChecker
   
The default implementation of the ModelChecker interface.
 
 It checks the following constraints:
 
 - The model is not null.
 
 - The model has exactly one state machine.
 
 - All states have a valid name.
 
 - All states have a valid stereotype 
     ('Page', 'Action', 'Module', 'FinalState').
 
 - All transitions have an event that is not null.
 
 - All events have a valid name.
 
 - All transitions have a valid guard condition.
 
 - All transitions that have a non-empty event name have an empty
     guard condition and vice versa.
 
 - All transitions that emerge from the same state are labelled 
     uniquely with an event name or a guard condition.
 
 - All transitions have a target state that is not null.
 
 - All transitions have a valid action setting a variable, if at all
 
 - All states have valid nested actions, i. e. they have no nested actions
     if they don't represent modules and they have exactly one nested action
     if they do.
 
 
 
 Tries to detect as many violations as possible and reports them in the
 list of detail messages in the ModelCheckerException.
- Author:
 
  - Matthias Burbach
 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
allowableStereotypes
protected java.util.List allowableStereotypes
DefaultModelChecker
public DefaultModelChecker()
check
public void check(Model model)
           throws ModelCheckerException,
                  java.lang.Exception
- Description copied from interface: 
ModelChecker 
- Is called before the actual generation is started to make sure the
 generator plug-ins get proper input.
 
 If this method throws an exception the generation will be cancelled and
 the exception will be reported to the user.
- Specified by:
 check in interface ModelChecker
 
- Parameters:
 model - the UML model to be checked
- Throws:
 ModelCheckerException - if the check found constraint violations 
                               in the model
java.lang.Exception - if the check failed for any other reason- See Also:
 ModelChecker.check(
                          de.matthias_burbach.uml.Model)
 
 
checkModelHasExactlyOneStateMachine
protected java.util.List checkModelHasExactlyOneStateMachine(Model model)
 
 
checkStateHasValidName
protected java.util.List checkStateHasValidName(State state)
 
 
checkStateHasValidStereotype
protected java.util.List checkStateHasValidStereotype(State state)
 
 
checkStateHasUniqueTransitions
protected java.util.List checkStateHasUniqueTransitions(State state)
 
 
checkTransitionHasValidEvent
protected java.util.List checkTransitionHasValidEvent(Transition transition)
 
 
checkTransitionHasValidEventName
protected java.util.List checkTransitionHasValidEventName(Transition transition)
 
 
checkTransitionHasValidGuardCondition
protected java.util.List checkTransitionHasValidGuardCondition(Transition transition)
 
 
checkTransitionHasValidAction
protected java.util.List checkTransitionHasValidAction(Transition transition,
                                                       java.util.Vector variables)
 
 
findVariableByName
private Variable findVariableByName(java.util.Vector variables,
                                    java.lang.String name)
 
 
checkTransitionHasValidTargetState
protected java.util.List checkTransitionHasValidTargetState(Transition transition)
 
 
checkStateHasValidActions
protected java.util.List checkStateHasValidActions(State state)
 
 
getException
protected java.lang.Exception getException(java.lang.String message)
 
 
isValidName
protected boolean isValidName(java.lang.String name)