|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnu.validator.htmlparser.test.JSONArrayTokenHandler
public class JSONArrayTokenHandler
Field Summary | |
---|---|
private com.sdicons.json.model.JSONArray |
array
|
private StringBuilder |
builder
|
private static com.sdicons.json.model.JSONString |
CHARACTER
|
private static com.sdicons.json.model.JSONString |
COMMENT
|
private String |
contentModelElement
|
private ContentModelFlag |
contentModelFlag
|
private static com.sdicons.json.model.JSONString |
DOCTYPE
|
private static com.sdicons.json.model.JSONString |
END_TAG
|
private static com.sdicons.json.model.JSONString |
PARSE_ERROR
|
private static com.sdicons.json.model.JSONString |
START_TAG
|
Constructor Summary | |
---|---|
JSONArrayTokenHandler()
|
Method Summary | |
---|---|
void |
characters(char[] buf,
int start,
int length)
Receive character tokens. |
void |
comment(char[] buf,
int length)
Receive a comment token. |
void |
doctype(String name,
String publicIdentifier,
String systemIdentifier,
boolean correct)
Receive a doctype token. |
void |
endTag(String name,
Attributes attributes)
Receive an end tag token. |
void |
eof()
The end-of-file token. |
void |
error(SAXParseException exception)
|
void |
fatalError(SAXParseException exception)
|
private void |
flushCharacters()
|
com.sdicons.json.model.JSONArray |
getArray()
Returns the array. |
void |
setContentModelFlag(ContentModelFlag contentModelFlag,
String contentModelElement)
|
void |
start(Tokenizer self)
This method is called at the start of tokenization before any other methods on this interface are called. |
void |
startTag(String name,
Attributes attributes)
Receive a start tag token. |
boolean |
wantsComments()
If this handler implementation cares about comments, return true . |
void |
warning(SAXParseException exception)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final com.sdicons.json.model.JSONString DOCTYPE
private static final com.sdicons.json.model.JSONString START_TAG
private static final com.sdicons.json.model.JSONString END_TAG
private static final com.sdicons.json.model.JSONString COMMENT
private static final com.sdicons.json.model.JSONString CHARACTER
private static final com.sdicons.json.model.JSONString PARSE_ERROR
private final StringBuilder builder
private com.sdicons.json.model.JSONArray array
private ContentModelFlag contentModelFlag
private String contentModelElement
Constructor Detail |
---|
public JSONArrayTokenHandler()
Method Detail |
---|
public void setContentModelFlag(ContentModelFlag contentModelFlag, String contentModelElement)
public void characters(char[] buf, int start, int length) throws SAXException
TokenHandler
characters
in interface TokenHandler
buf
- a buffer holding the datastart
- offset into the bufferlength
- the number of code units to read
SAXException
- if something went wrongContentHandler.characters(char[], int, int)
private void flushCharacters()
public void comment(char[] buf, int length) throws SAXException
TokenHandler
wantsComments()
returned false
.
comment
in interface TokenHandler
buf
- a buffer holding the datalength
- the number of code units to read
SAXException
- if something went wrongpublic void doctype(String name, String publicIdentifier, String systemIdentifier, boolean correct) throws SAXException
TokenHandler
doctype
in interface TokenHandler
name
- the namepublicIdentifier
- the public idsystemIdentifier
- the system idcorrect
- whether the token is correct
SAXException
- if something went wrongpublic void endTag(String name, Attributes attributes) throws SAXException
TokenHandler
endTag
in interface TokenHandler
name
- the tag nameattributes
- the attributes
SAXException
- if something went wrongpublic void eof() throws SAXException
TokenHandler
eof
in interface TokenHandler
SAXException
- if something went wrongpublic void start(Tokenizer self) throws SAXException
TokenHandler
Tokenizer
in order to set the
content model flag and in order to be able to query for
Locator
data.
start
in interface TokenHandler
self
- the Tokenizer
.
SAXException
- if something went wrongpublic void startTag(String name, Attributes attributes) throws SAXException
TokenHandler
startTag
in interface TokenHandler
name
- the tag nameattributes
- the attributes
SAXException
- if something went wrongpublic boolean wantsComments() throws SAXException
TokenHandler
true
.
If not, return false
.
wantsComments
in interface TokenHandler
SAXException
- if something went wrongpublic void error(SAXParseException exception) throws SAXException
error
in interface ErrorHandler
SAXException
public void fatalError(SAXParseException exception) throws SAXException
fatalError
in interface ErrorHandler
SAXException
public void warning(SAXParseException exception) throws SAXException
warning
in interface ErrorHandler
SAXException
public com.sdicons.json.model.JSONArray getArray()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |