org.squirrelframework.foundation.fsm.impl
Class StateMachineImporterImpl<T extends StateMachine<T,S,E,C>,S,E,C>
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.squirrelframework.foundation.fsm.impl.StateMachineImporterImpl<T,S,E,C>
- All Implemented Interfaces:
- StateMachineImporter<T,S,E,C>, ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class StateMachineImporterImpl<T extends StateMachine<T,S,E,C>,S,E,C>
- extends org.xml.sax.helpers.DefaultHandler
- implements StateMachineImporter<T,S,E,C>
|
Field Summary |
protected Stack<MutableState<T,S,E,C>> |
currentStates
|
protected org.squirrelframework.foundation.fsm.impl.TransitionBuilderImpl<T,S,E,C> |
currentTranstionBuilder
|
protected Converter<E> |
eventConverter
|
protected com.google.common.collect.ListMultimap<MutableState<T,S,E,C>,MutableState<T,S,E,C>> |
hierarchicalStateStore
|
protected Boolean |
isEntryAction
|
protected Map<String,Object> |
reusableInstance
|
static String |
SCXML_NAMESPACE
|
static String |
SQRL_NAMESPACE
|
protected String |
sqrlPrefix
|
protected Converter<S> |
stateConverter
|
protected StateMachineBuilder<T,S,E,C> |
stateMachineBuilder
|
protected String |
value
|
|
Method Summary |
void |
characters(char[] buffer,
int start,
int length)
|
void |
endElement(String uri,
String localName,
String qName)
|
protected MutableState<T,S,E,C> |
getCurrentState()
|
protected org.squirrelframework.foundation.fsm.impl.TransitionBuilderImpl<T,S,E,C> |
getCurrentTranstionBuilder()
|
StateMachineBuilder<T,S,E,C> |
importFromFile(File content)
|
StateMachineBuilder<T,S,E,C> |
importFromInputStream(InputStream content)
|
StateMachineBuilder<T,S,E,C> |
importFromString(String content)
|
protected boolean |
isConstructState()
|
protected boolean |
isConstructTransition()
|
void |
registerReusableInstance(Object instance)
|
void |
registerReusableInstance(String instanceName,
Object instance)
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
|
void |
startPrefixMapping(String prefix,
String uri)
|
void |
unregisterReusableInstance(String instanceName)
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQRL_NAMESPACE
public static String SQRL_NAMESPACE
SCXML_NAMESPACE
public static String SCXML_NAMESPACE
value
protected String value
sqrlPrefix
protected String sqrlPrefix
stateConverter
protected Converter<S> stateConverter
eventConverter
protected Converter<E> eventConverter
stateMachineBuilder
protected StateMachineBuilder<T extends StateMachine<T,S,E,C>,S,E,C> stateMachineBuilder
currentStates
protected final Stack<MutableState<T extends StateMachine<T,S,E,C>,S,E,C>> currentStates
currentTranstionBuilder
protected org.squirrelframework.foundation.fsm.impl.TransitionBuilderImpl<T extends StateMachine<T,S,E,C>,S,E,C> currentTranstionBuilder
hierarchicalStateStore
protected final com.google.common.collect.ListMultimap<MutableState<T extends StateMachine<T,S,E,C>,S,E,C>,MutableState<T extends StateMachine<T,S,E,C>,S,E,C>> hierarchicalStateStore
isEntryAction
protected Boolean isEntryAction
reusableInstance
protected final Map<String,Object> reusableInstance
StateMachineImporterImpl
public StateMachineImporterImpl()
startPrefixMapping
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
- Specified by:
startPrefixMapping in interface ContentHandler- Overrides:
startPrefixMapping in class org.xml.sax.helpers.DefaultHandler
- Throws:
SAXException
characters
public void characters(char[] buffer,
int start,
int length)
- Specified by:
characters in interface ContentHandler- Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
startElement
public void startElement(String uri,
String localName,
String qName,
Attributes attributes)
throws SAXException
- Specified by:
startElement in interface ContentHandler- Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
- Throws:
SAXException
isConstructState
protected boolean isConstructState()
isConstructTransition
protected boolean isConstructTransition()
endElement
public void endElement(String uri,
String localName,
String qName)
throws SAXException
- Specified by:
endElement in interface ContentHandler- Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
- Throws:
SAXException
getCurrentState
protected MutableState<T,S,E,C> getCurrentState()
getCurrentTranstionBuilder
protected org.squirrelframework.foundation.fsm.impl.TransitionBuilderImpl<T,S,E,C> getCurrentTranstionBuilder()
importFromInputStream
public StateMachineBuilder<T,S,E,C> importFromInputStream(InputStream content)
- Specified by:
importFromInputStream in interface StateMachineImporter<T extends StateMachine<T,S,E,C>,S,E,C>
importFromString
public StateMachineBuilder<T,S,E,C> importFromString(String content)
- Specified by:
importFromString in interface StateMachineImporter<T extends StateMachine<T,S,E,C>,S,E,C>
importFromFile
public StateMachineBuilder<T,S,E,C> importFromFile(File content)
- Specified by:
importFromFile in interface StateMachineImporter<T extends StateMachine<T,S,E,C>,S,E,C>
registerReusableInstance
public void registerReusableInstance(Object instance)
- Specified by:
registerReusableInstance in interface StateMachineImporter<T extends StateMachine<T,S,E,C>,S,E,C>
unregisterReusableInstance
public void unregisterReusableInstance(String instanceName)
- Specified by:
unregisterReusableInstance in interface StateMachineImporter<T extends StateMachine<T,S,E,C>,S,E,C>
registerReusableInstance
public void registerReusableInstance(String instanceName,
Object instance)
- Specified by:
registerReusableInstance in interface StateMachineImporter<T extends StateMachine<T,S,E,C>,S,E,C>
Copyright © 2013-2014. All Rights Reserved.