Package | Description |
---|---|
net.sourceforge.anotherfsm.qfsm |
Parser of Qfsm file format, Java
code generator.
|
Modifier and Type | Method and Description |
---|---|
static void |
XmlUtils.checkElementName(org.w3c.dom.Element element,
java.lang.String expected)
Check the element has the expected name.
|
static QfsmTransition.TransitionType |
QfsmTransition.TransitionType.convert(int value)
Convert an integer value to the enum.
|
static QfsmMachine.MachineType |
QfsmMachine.MachineType.convert(int value)
Convert an integer value to the enum.
|
static QfsmMachine.ArrowType |
QfsmMachine.ArrowType.convert(int value)
Convert an integer value to the enum.
|
static void |
XmlUtils.ensureNotEmpty(java.lang.String string,
java.lang.String objectName)
Verify the string is not empty.
|
static void |
XmlUtils.ensureNotNull(java.lang.Object object,
java.lang.String objectName)
Verify the passed object is not null.
|
(package private) void |
QfsmMachine.evaluateStates()
Evaluate state IDs to object references.
|
private void |
CodeGenerator.generateProcessor() |
private void |
CodeGenerator.genFsmFile()
Generate the state machine file.
|
private java.lang.String |
CodeGenerator.genGlobalStateListeners()
Generate the global state listener.
|
private java.lang.String |
CodeGenerator.genGlobalTransitionListener()
Generate the global transition listener.
|
private java.lang.String |
CodeGenerator.genStateDeclarations()
Generate declarations of states.
|
private java.lang.String |
CodeGenerator.genStateInitializations()
Generate initializations of states.
|
private java.lang.String |
CodeGenerator.genStateListeners()
Generate the state listeners.
|
private java.lang.String |
CodeGenerator.genTransitionDeclarations()
Generate declarations of transitions.
|
private java.lang.String |
CodeGenerator.genTransitionInitializations()
Generate initializations of transitions.
|
private java.lang.String |
CodeGenerator.genTransitionListeners()
Generate the transition listeners.
|
static java.lang.String |
XmlUtils.getAtribute(org.w3c.dom.Element element,
java.lang.String name)
Get a value of an attribute.
|
static java.util.List<org.w3c.dom.Element> |
XmlUtils.getElements(org.w3c.dom.Element element,
java.lang.String name)
Get all subelements with a concrete name.
|
static org.w3c.dom.Element |
XmlUtils.getOneElement(org.w3c.dom.Element element,
java.lang.String name)
Get one subelement with a concrete name.
|
static org.w3c.dom.Element |
XmlUtils.getOneOptionalElement(org.w3c.dom.Element element,
java.lang.String name)
Get one optional subelement with a concrete name.
|
static java.lang.String |
XmlUtils.getOptionalAtribute(org.w3c.dom.Element element,
java.lang.String name)
Get a value of an optional attribute.
|
static java.lang.String |
XmlUtils.getOptionalText(org.w3c.dom.Element element)
Get optional text located inside an element.
|
(package private) QfsmState |
QfsmMachine.getState(int stateId)
Get a state with a specified ID.
|
(package private) QfsmState |
QfsmMachine.getState(java.lang.String stateName)
Get a state with a specified name.
|
static java.lang.String |
XmlUtils.getText(org.w3c.dom.Element element)
Get text located inside an element.
|
(package private) QfsmTransition |
QfsmMachine.getTransition(int startStateId,
java.lang.String inputEvent,
int destinationStateId) |
private static java.lang.String |
CodeGenerator.loadTemplate(java.lang.String name)
Load a template for the code generation.
|
static QfsmProject |
Parser.parse(java.io.File file)
Parse a Qfsm file.
|
static Configuration |
Configuration.parse(java.io.File file)
Parse a configuration file.
|
static QfsmProject |
Parser.parse(java.lang.String path)
Parse a Qfsm file.
|
static Configuration |
Configuration.parse(java.lang.String path)
Parse a configuration file.
|
private static Configuration |
Configuration.parseConfiguration(org.w3c.dom.Element configurationEl)
Parse the XML content
|
private static QfsmInitialTransition |
Parser.parseInitialTransition(org.w3c.dom.Element itrEl) |
private static QfsmMachine |
Parser.parseMachine(org.w3c.dom.Element machineEl) |
private static QfsmProject |
Parser.parseProject(org.w3c.dom.Element projectEl) |
private static java.util.List<QfsmState> |
Parser.parseStates(java.util.List<org.w3c.dom.Element> elements) |
private static java.util.List<QfsmTransition> |
Parser.parseTransitions(java.util.List<org.w3c.dom.Element> elements) |
static boolean |
XmlUtils.toBoolean(java.lang.String string)
Parse string to a boolean value.
|
static double |
XmlUtils.toDouble(java.lang.String string)
Parse string to a double value.
|
static org.w3c.dom.Element |
XmlUtils.toElement(org.w3c.dom.Node node)
Convert a node to an element.
|
static int |
XmlUtils.toInt(java.lang.String string)
Parse string to an integer value.
|
private static void |
CodeGenerator.writeFile(java.io.File file,
java.lang.String content,
boolean force)
Write a text file.
|
Constructor and Description |
---|
CodeGenerator(CodeGeneratorParameters parameters)
Create the object.
|
CodeGeneratorParameters(java.lang.String[] args,
java.lang.String commandLine)
Create the object.
|
Copyright 2013 Michal Turek, AnotherFSM.