| Modifier and Type | Field and Description |
|---|---|
static int |
ARRAY |
static int |
END |
static byte |
EOI |
int |
ISO8601_LEN_0 |
int |
ISO8601_LEN_1 |
int |
ISO8601_LEN_2 |
int |
matchStat |
static int |
NOT_MATCH |
static int |
NOT_MATCH_NAME |
static int |
OBJECT |
int |
resetCount |
static int |
UNKOWN |
static int |
VALUE |
| Constructor and Description |
|---|
JSONScanner(char[] input,
int inputLength) |
JSONScanner(char[] input,
int inputLength,
int features) |
JSONScanner(String input) |
JSONScanner(String input,
int features) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
bytesValue() |
char |
charAt(int index) |
void |
close() |
void |
config(Feature feature,
boolean state) |
BigDecimal |
decimalValue() |
Number |
decimalValue(boolean decimal) |
double |
doubleValue() |
float |
floatValue() |
int |
getBufferPosition() |
Calendar |
getCalendar() |
char |
getCurrent() |
void |
incrementBufferPosition() |
Number |
integerValue() |
int |
intValue() |
boolean |
isBlankInput() |
boolean |
isEnabled(Feature feature) |
boolean |
isEOF() |
boolean |
isRef() |
boolean |
isResetFlag() |
static boolean |
isWhitespace(char ch) |
long |
longValue() |
boolean |
matchField(char[] fieldName) |
void |
nextToken() |
void |
nextToken(int expect) |
void |
nextTokenWithColon() |
void |
nextTokenWithColon(int expect) |
String |
numberString() |
int |
pos()
Return the current token's position: a 0-based offset from beginning of the raw input stream (before unicode
translation)
|
void |
reset(int mark,
char mark_ch,
int token) |
void |
resetStringPosition() |
void |
scanFalse() |
boolean |
scanFieldBoolean(char[] fieldName) |
double |
scanFieldDouble(char[] fieldName) |
float |
scanFieldFloat(char[] fieldName) |
int |
scanFieldInt(char[] fieldName) |
long |
scanFieldLong(char[] fieldName) |
String |
scanFieldString(char[] fieldName) |
ArrayList<String> |
scanFieldStringArray(char[] fieldName) |
Collection<String> |
scanFieldStringArray(char[] fieldName,
Class<?> type) |
String |
scanFieldSymbol(char[] fieldName,
SymbolTable symbolTable) |
void |
scanIdent() |
boolean |
scanISO8601DateIfMatch() |
void |
scanNullOrNew() |
void |
scanNumber() |
void |
scanSet() |
void |
scanString() |
void |
scanStringSingleQuote() |
String |
scanSymbol(SymbolTable symbolTable) |
String |
scanSymbol(SymbolTable symbolTable,
char quote) |
String |
scanSymbolUnQuoted(SymbolTable symbolTable) |
void |
scanTreeSet() |
void |
scanTrue() |
int |
scanType(String type) |
void |
setResetFlag(boolean resetFlag) |
void |
skipWhitespace() |
String |
stringDefaultValue() |
String |
stringVal()
The value of a literal token, recorded as a string.
|
String |
subString(int offset,
int count) |
String |
symbol(SymbolTable symbolTable) |
int |
token()
Return the current token, set by nextToken().
|
String |
tokenName() |
public static final byte EOI
public int resetCount
public static final int NOT_MATCH
public static final int NOT_MATCH_NAME
public static final int UNKOWN
public static final int OBJECT
public static final int ARRAY
public static final int VALUE
public static final int END
public int matchStat
public final int ISO8601_LEN_0
public final int ISO8601_LEN_1
public final int ISO8601_LEN_2
public JSONScanner(String input)
public JSONScanner(String input, int features)
public JSONScanner(char[] input,
int inputLength)
public JSONScanner(char[] input,
int inputLength,
int features)
public final char charAt(int index)
public boolean isResetFlag()
isResetFlag in interface JSONLexerpublic void setResetFlag(boolean resetFlag)
setResetFlag in interface JSONLexerpublic final int getBufferPosition()
getBufferPosition in interface JSONLexerpublic void reset(int mark,
char mark_ch,
int token)
public boolean isBlankInput()
isBlankInput in interface JSONLexerpublic static final boolean isWhitespace(char ch)
public final int token()
public final void skipWhitespace()
skipWhitespace in interface JSONLexerpublic final char getCurrent()
getCurrent in interface JSONLexerpublic final void nextTokenWithColon()
public final void nextTokenWithColon(int expect)
nextTokenWithColon in interface JSONLexerpublic final void incrementBufferPosition()
incrementBufferPosition in interface JSONLexerpublic final void resetStringPosition()
resetStringPosition in interface JSONLexerpublic final void scanStringSingleQuote()
public final void scanString()
scanString in interface JSONLexerpublic final String scanSymbolUnQuoted(SymbolTable symbolTable)
scanSymbolUnQuoted in interface JSONLexerpublic int scanType(String type)
public boolean matchField(char[] fieldName)
public String scanFieldString(char[] fieldName)
public String stringDefaultValue()
public String scanFieldSymbol(char[] fieldName, SymbolTable symbolTable)
public Collection<String> scanFieldStringArray(char[] fieldName, Class<?> type)
public int scanFieldInt(char[] fieldName)
public boolean scanFieldBoolean(char[] fieldName)
public long scanFieldLong(char[] fieldName)
public float scanFieldFloat(char[] fieldName)
public byte[] bytesValue()
bytesValue in interface JSONLexerpublic double scanFieldDouble(char[] fieldName)
public String scanSymbol(SymbolTable symbolTable)
scanSymbol in interface JSONLexerpublic final String scanSymbol(SymbolTable symbolTable, char quote)
scanSymbol in interface JSONLexerpublic void scanTrue()
public void scanSet()
public void scanTreeSet()
public void scanNullOrNew()
public void scanFalse()
public void scanIdent()
public void scanNumber()
scanNumber in interface JSONLexerpublic final int pos()
public final String stringVal()
public final String subString(int offset, int count)
public boolean isRef()
public final String symbol(SymbolTable symbolTable)
public Number integerValue() throws NumberFormatException
integerValue in interface JSONLexerNumberFormatExceptionpublic long longValue()
throws NumberFormatException
longValue in interface JSONLexerNumberFormatExceptionpublic final String numberString()
numberString in interface JSONLexerpublic float floatValue()
floatValue in interface JSONLexerpublic double doubleValue()
doubleValue in interface JSONLexerpublic Number decimalValue(boolean decimal)
decimalValue in interface JSONLexerpublic BigDecimal decimalValue()
decimalValue in interface JSONLexerpublic void config(Feature feature, boolean state)
public boolean scanISO8601DateIfMatch()
scanISO8601DateIfMatch in interface JSONLexerpublic Calendar getCalendar()
getCalendar in interface JSONLexerCopyright © 2012-2013 Alibaba Group. All Rights Reserved.