Package com.sun.msv.reader
Class SimpleState
java.lang.Object
com.sun.msv.reader.State
com.sun.msv.reader.SimpleState
- All Implemented Interfaces:
ContentHandler
- Direct Known Subclasses:
AttPoolState,ChildlessState,DefineState,DivInModuleState,ElementRuleWithHedgeState,ElementRuleWithTypeState,ExpressionState,GlobalDeclState,GrammarState,HedgeRuleBaseState,IdentityConstraintState,IncludeMergeState,InlineTagState,InterfaceState,ListState,NameClassState,RestrictionState,RootGrammarState,RootIncludedPatternState,RootIncludedSchemaState,RootMergedGrammarState,SimpleTypeState,TagState,UnionState
base interface of the most of parsing states.
In this level of inheritance, contract is as follows.
- startElement(
) event is received by the parent state. It usually creates a child state by this event. ) event is received by this object, it calls endSelf method and reverts to the parent state. Derived classes are responsible for doing anything necessary within endSelf method.- startSelf method of the child SimpleState is called. derived classes should perform necessary things by reading start tag information.
- Whenever startElement method is received by SimpleState object, createChildState method is called to create a child state. Derived classes are responsible for providing appropriate child state objects.
- Child state handles descendants. Usually, it finishes parsing when it sees endElement.
- When endElement(
- Author:
- Kohsuke KAWAGUCHI
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Statecreates appropriate child state object for this elementfinal voidfinal voidendElement(String namespaceURI, String localName, String qName) protected voidendSelf()this method is called in endElement method when the state is about to be removed.protected booleanchecks if this element belongs to the grammar.voidstartElement(String namespaceURI, String localName, String qName, Attributes atts) Methods inherited from class com.sun.msv.reader.State
_assert, callInterceptExpression, characters, endPrefixMapping, getBaseURI, getLocation, getParentState, getStartTag, ignorableWhitespace, init, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, startSelfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
SimpleState
public SimpleState()
-
-
Method Details
-
isGrammarElement
checks if this element belongs to the grammar. -
startElement
-
createChildState
creates appropriate child state object for this element -
endElement
-
endDocument
public final void endDocument() -
endSelf
protected void endSelf()this method is called in endElement method when the state is about to be removed. derived-class should perform any wrap-up job
-