org.cesta.trans.java
Class ValidateStateTransitions
java.lang.Object
org.cesta.trans.AbstractTransformation
org.cesta.trans.java.AbstractRewriteTransformation
org.cesta.trans.java.ValidateStateTransitions
- All Implemented Interfaces:
- Transformation
public class ValidateStateTransitions
- extends AbstractRewriteTransformation
Transformation, which can check state transitions in class
according to rules defined in GraphViz's DOT language.
Parameters:
Name | Type | Default | Description |
stateSetter |
String |
"setState" |
name of function to set state
|
stateSetterArg |
String |
"newState" |
name of argument in state setter
|
stateGetter |
String |
"getState" |
name of function to get state
|
stateConstants |
String (regexp) |
"STATE_.*" |
name of state constants
|
allowedFunctions |
String (regexp) |
"" |
name of functions, that should be always allowed
|
ignoredFunctions |
String (regexp) |
"" |
name of functions, that should be completely ignored
|
Basic parameters are inherited from AbstractRewriteTransformation
.
- Author:
- Tobias Smolka
Methods inherited from class org.cesta.trans.AbstractTransformation |
addMappedFile, clearParams, getMappedFiles, getParam, getParam, getParamB, getParamB, getParams, getParamS, getParamS, setMappedFiles, setParam, setParams |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
graph
protected DotTree.Graph graph
ValidateStateTransitions
public ValidateStateTransitions()
setGraph
public void setGraph(DotTree.Graph graph)
getGraph
public DotTree.Graph getGraph()
transform
public void transform(MappedFile filePair)
throws TransformationException
- Transforms single file
- Specified by:
transform
in class AbstractRewriteTransformation
- Parameters:
filePair
- File pair (input/output) to transform
- Throws:
TransformationException
- In case transformation failed
loadDotGraph
public void loadDotGraph()
throws TransformationException
- Loads given DOT graph.
- Throws:
TransformationException
- in case that graph could not be loaded and parsed
execute
public void execute()
throws TransformationException
- Description copied from class:
AbstractRewriteTransformation
- Main entry point of the transformation
- Specified by:
execute
in interface Transformation
- Overrides:
execute
in class AbstractRewriteTransformation
- Throws:
TransformationException
- In case transformation failed
getDefaultParams
public java.util.Map<java.lang.String,java.lang.Object> getDefaultParams()
- Returns default parameters
- Overrides:
getDefaultParams
in class AbstractRewriteTransformation
- Returns:
- map of parameters