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, wait
endDocument, endElement, startElement
protected 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 ContentHandler
SAXException
protected final Expression callInterceptExpression(Expression exp)
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
public void ignorableWhitespace(char[] buffer, int from, int len) throws SAXException
ignorableWhitespace
in interface ContentHandler
SAXException
public void skippedEntity(String name) throws SAXException
skippedEntity
in interface ContentHandler
SAXException
public final void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
public void setDocumentLocator(Locator loc)
setDocumentLocator
in interface ContentHandler
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
Copyright © 2016 Oracle Corporation. All rights reserved.