public abstract class State extends Object implements ContentHandler
Each State-derived class is responsible for a particular type of declaration of the grammar. For example, SequenceState is responsible for parsing <sequence> element of RELAX module.
State objects interact each other. There are two ways of interaction.
In this level of inheritance, contract is somewhat abstract.
SimpleState.
this class also provides:
| Modifier and Type | Field and Description |
|---|---|
protected String |
baseURI
base URI for this state.
|
protected Locator |
location
Location of the start tag.
|
protected State |
parentState
parent state of this state.
|
GrammarReader |
reader
reader object who is the owner of this object.
|
protected StartTagInfo |
startTag
information of the start tag.
|
| Constructor and Description |
|---|
State() |
| Modifier and Type | Method and Description |
|---|---|
static void |
_assert(boolean b) |
protected Expression |
callInterceptExpression(Expression exp) |
void |
characters(char[] buffer,
int from,
int len) |
void |
endPrefixMapping(String prefix) |
String |
getBaseURI() |
Locator |
getLocation() |
State |
getParentState() |
StartTagInfo |
getStartTag() |
void |
ignorableWhitespace(char[] buffer,
int from,
int len) |
protected void |
init(GrammarReader reader,
State parentState,
StartTagInfo startTag) |
void |
processingInstruction(String target,
String data) |
void |
setDocumentLocator(Locator loc) |
void |
skippedEntity(String name) |
void |
startDocument() |
void |
startPrefixMapping(String prefix,
String uri) |
protected void |
startSelf()
performs a task that should be done before reading any child elements.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitendDocument, endElement, startElementprotected State parentState
public GrammarReader reader
protected StartTagInfo startTag
protected Locator location
protected String baseURI
public final State getParentState()
public StartTagInfo getStartTag()
public Locator getLocation()
public String getBaseURI()
protected final void init(GrammarReader reader, State parentState, StartTagInfo startTag)
protected void startSelf()
public static void _assert(boolean b)
public void characters(char[] buffer,
int from,
int len)
throws SAXException
characters in interface ContentHandlerSAXExceptionprotected final Expression callInterceptExpression(Expression exp)
public void processingInstruction(String target, String data) throws SAXException
processingInstruction in interface ContentHandlerSAXExceptionpublic void ignorableWhitespace(char[] buffer,
int from,
int len)
throws SAXException
ignorableWhitespace in interface ContentHandlerSAXExceptionpublic void skippedEntity(String name) throws SAXException
skippedEntity in interface ContentHandlerSAXExceptionpublic final void startDocument()
throws SAXException
startDocument in interface ContentHandlerSAXExceptionpublic void setDocumentLocator(Locator loc)
setDocumentLocator in interface ContentHandlerpublic void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping in interface ContentHandlerSAXExceptionpublic void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping in interface ContentHandlerSAXExceptionCopyright © 2014 Oracle Corporation. All Rights Reserved.