public abstract class JSONParseAdapter extends Object implements JSONParseListener
Constructor and Description |
---|
JSONParseAdapter() |
Modifier and Type | Method and Description |
---|---|
boolean |
abort()
returns false
|
void |
charRead(int index,
char character)
does nothing
|
void |
elemEnded(int commaIndex,
char character)
does nothing
|
void |
elemStarted(int commaIndex,
char character)
does nothing
|
void |
ended()
does nothing
|
void |
endingBracket(int index,
char character)
does nothing
|
void |
keyValueSeparation(int colonIndex,
char character)
does nothing
|
void |
openingBracket(int index,
char character)
does nothing
|
void |
started()
does nothing
|
public boolean abort() throws IllegalStateException
abort
in interface JSONParseListener
IllegalStateException
- neverpublic void charRead(int index, char character) throws IllegalStateException
charRead
in interface JSONParseListener
index
- the index of the read charcharacter
- the character readIllegalStateException
- if a character should not be readpublic void elemEnded(int commaIndex, char character) throws IllegalStateException, ParseException
elemEnded
in interface JSONParseListener
commaIndex
- the index of the ended elementcharacter
- the char that ended the elementIllegalStateException
- if a character should not be readParseException
- if the element is illegal in some waypublic void elemStarted(int commaIndex, char character) throws IllegalStateException
elemStarted
in interface JSONParseListener
commaIndex
- the index of the ended elementcharacter
- the char that started the elementIllegalStateException
- if a character should not be readpublic void ended() throws IllegalStateException, ParseException
ended
in interface JSONParseListener
IllegalStateException
- if this should not endParseException
- if anything is amispublic void endingBracket(int index, char character) throws IllegalStateException, ParseException
endingBracket
in interface JSONParseListener
index
- the index of the ended bracketcharacter
- the char of the ended bracketIllegalStateException
- if a character should not be readParseException
- if the element is illegal in some waypublic void keyValueSeparation(int colonIndex, char character) throws IllegalStateException, ParseException, ClassCastException
keyValueSeparation
in interface JSONParseListener
colonIndex
- the index of the colon indicating the separationcharacter
- the character indicating the separationIllegalStateException
- if this cannot accept such an eventParseException
- if there is no way a key-value separation should occur hereClassCastException
- if the key is not a JSONString, or cannot be otherwise parsedpublic void openingBracket(int index, char character) throws IllegalStateException, ParseException
openingBracket
in interface JSONParseListener
index
- the index of the opened bracketcharacter
- the char that opened the bracketIllegalStateException
- if a character should not be readParseException
- if the element is illegal in some waypublic void started() throws IllegalStateException
started
in interface JSONParseListener
IllegalStateException
- if this should not be starting