|
||||||||||
| 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 TokenHandlerbuf - 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
TokenHandlerwantsComments()
returned false.
comment in interface TokenHandlerbuf - a buffer holding the datalength - the number of code units to read
SAXException - if something went wrong
public void doctype(String name,
String publicIdentifier,
String systemIdentifier,
boolean correct)
throws SAXException
TokenHandler
doctype in interface TokenHandlername - the namepublicIdentifier - the public idsystemIdentifier - the system idcorrect - whether the token is correct
SAXException - if something went wrong
public void endTag(String name,
Attributes attributes)
throws SAXException
TokenHandler
endTag in interface TokenHandlername - the tag nameattributes - the attributes
SAXException - if something went wrong
public void eof()
throws SAXException
TokenHandler
eof in interface TokenHandlerSAXException - if something went wrong
public void start(Tokenizer self)
throws SAXException
TokenHandlerTokenizer in order to set the
content model flag and in order to be able to query for
Locator data.
start in interface TokenHandlerself - the Tokenizer.
SAXException - if something went wrong
public void startTag(String name,
Attributes attributes)
throws SAXException
TokenHandler
startTag in interface TokenHandlername - the tag nameattributes - the attributes
SAXException - if something went wrong
public boolean wantsComments()
throws SAXException
TokenHandlertrue.
If not, return false.
wantsComments in interface TokenHandlerSAXException - if something went wrong
public void error(SAXParseException exception)
throws SAXException
error in interface ErrorHandlerSAXException
public void fatalError(SAXParseException exception)
throws SAXException
fatalError in interface ErrorHandlerSAXException
public void warning(SAXParseException exception)
throws SAXException
warning in interface ErrorHandlerSAXExceptionpublic com.sdicons.json.model.JSONArray getArray()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||