de.matthias_burbach.flux
Class DefaultModelChecker

java.lang.Object
  extended byde.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:

Tries to detect as many violations as possible and reports them in the list of detail messages in the ModelCheckerException.

Author:
Matthias Burbach

Field Summary
protected  java.util.List allowableStereotypes
           
 
Constructor Summary
DefaultModelChecker()
           
 
Method Summary
 void check(Model model)
          Is called before the actual generation is started to make sure the generator plug-ins get proper input.
protected  java.util.List checkModelHasExactlyOneStateMachine(Model model)
           
protected  java.util.List checkStateHasUniqueTransitions(State state)
           
protected  java.util.List checkStateHasValidActions(State state)
           
protected  java.util.List checkStateHasValidName(State state)
           
protected  java.util.List checkStateHasValidStereotype(State state)
           
protected  java.util.List checkTransitionHasValidAction(Transition transition, java.util.Vector variables)
           
protected  java.util.List checkTransitionHasValidEvent(Transition transition)
           
protected  java.util.List checkTransitionHasValidEventName(Transition transition)
           
protected  java.util.List checkTransitionHasValidGuardCondition(Transition transition)
           
protected  java.util.List checkTransitionHasValidTargetState(Transition transition)
           
private  Variable findVariableByName(java.util.Vector variables, java.lang.String name)
           
protected  java.lang.Exception getException(java.lang.String message)
           
protected  boolean isValidName(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allowableStereotypes

protected java.util.List allowableStereotypes
Constructor Detail

DefaultModelChecker

public DefaultModelChecker()
Method Detail

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)