public abstract class JSONLexerBase extends Object implements JSONLexer, Closeable
| Modifier and Type | Field and Description |
|---|---|
int |
matchStat |
ARRAY, END, EOI, NOT_MATCH, NOT_MATCH_NAME, OBJECT, UNKNOWN, VALUE, VALUE_NULL| Constructor and Description |
|---|
JSONLexerBase(int features) |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
addSymbol(int offset,
int len,
int hash,
SymbolTable symbolTable) |
abstract byte[] |
bytesValue() |
abstract char |
charAt(int index) |
void |
close() |
void |
config(Feature feature,
boolean state) |
abstract BigDecimal |
decimalValue() |
Number |
decimalValue(boolean decimal) |
double |
doubleValue() |
float |
floatValue() |
Calendar |
getCalendar() |
char |
getCurrent() |
int |
getFeatures() |
Locale |
getLocale() |
TimeZone |
getTimeZone() |
abstract int |
indexOf(char ch,
int startIndex) |
String |
info() |
Number |
integerValue() |
int |
intValue() |
boolean |
isBlankInput() |
boolean |
isEnabled(Feature feature) |
boolean |
isEnabled(int feature) |
boolean |
isEnabled(int features,
int feature) |
abstract boolean |
isEOF() |
boolean |
isRef() |
static boolean |
isWhitespace(char ch) |
long |
longValue() |
boolean |
matchField(char[] fieldName) |
int |
matchField(long fieldNameHash) |
boolean |
matchField2(char[] fieldName) |
int |
matchStat() |
Collection<String> |
newCollectionByType(Class<?> type) |
abstract char |
next() |
void |
nextIdent() |
void |
nextToken() |
void |
nextToken(int expect) |
void |
nextTokenWithChar(char expect) |
void |
nextTokenWithColon() |
void |
nextTokenWithColon(int expect) |
abstract String |
numberString() |
int |
pos() |
static String |
readString(char[] chars,
int chars_len) |
void |
resetStringPosition() |
boolean |
scanBoolean(char expectNext) |
Date |
scanDate(char seperator) |
BigDecimal |
scanDecimal(char seperator) |
double |
scanDouble(char seperator) |
Enum<?> |
scanEnum(Class<?> enumClass,
SymbolTable symbolTable,
char serperator) |
long |
scanEnumSymbol(char[] fieldName) |
void |
scanFalse() |
BigInteger |
scanFieldBigInteger(char[] fieldName) |
boolean |
scanFieldBoolean(char[] fieldName) |
Date |
scanFieldDate(char[] fieldName) |
BigDecimal |
scanFieldDecimal(char[] fieldName) |
double |
scanFieldDouble(char[] fieldName) |
float |
scanFieldFloat(char[] fieldName) |
float[] |
scanFieldFloatArray(char[] fieldName) |
float[][] |
scanFieldFloatArray2(char[] fieldName) |
int |
scanFieldInt(char[] fieldName) |
int[] |
scanFieldIntArray(char[] fieldName) |
long |
scanFieldLong(char[] fieldName) |
String |
scanFieldString(char[] fieldName) |
Collection<String> |
scanFieldStringArray(char[] fieldName,
Class<?> type) |
String[] |
scanFieldStringArray(char[] fieldName,
int argTypesCount,
SymbolTable typeSymbolTable)
hsf support
|
long |
scanFieldSymbol(char[] fieldName) |
UUID |
scanFieldUUID(char[] fieldName) |
float |
scanFloat(char seperator) |
void |
scanHex() |
void |
scanIdent() |
int |
scanInt(char expectNext) |
long |
scanLong(char expectNextChar) |
void |
scanNullOrNew() |
void |
scanNullOrNew(boolean acceptColon) |
void |
scanNumber() |
void |
scanString() |
String |
scanString(char expectNextChar) |
void |
scanStringArray(Collection<String> list,
char seperator) |
String |
scanSymbol(SymbolTable symbolTable) |
String |
scanSymbol(SymbolTable symbolTable,
char quote) |
String |
scanSymbolUnQuoted(SymbolTable symbolTable) |
String |
scanSymbolWithSeperator(SymbolTable symbolTable,
char serperator) |
void |
scanTrue() |
int |
scanType(String type) |
String |
scanTypeName(SymbolTable symbolTable) |
UUID |
scanUUID(char seperator) |
boolean |
seekArrayToItem(int index) |
int |
seekObjectToField(long[] fieldNameHash) |
int |
seekObjectToField(long fieldNameHash,
boolean deepScan) |
int |
seekObjectToFieldDeepScan(long fieldNameHash) |
void |
setFeatures(int features) |
void |
setLocale(Locale locale) |
void |
setTimeZone(TimeZone timeZone) |
void |
setToken(int token)
internal method, don't invoke
|
void |
skipArray() |
void |
skipObject() |
void |
skipObject(boolean valid) |
void |
skipWhitespace() |
String |
stringDefaultValue() |
abstract String |
stringVal() |
abstract String |
subString(int offset,
int count) |
int |
token() |
String |
tokenName() |
public final int matchStat()
public void setToken(int token)
token - public final void nextIdent()
public final void nextTokenWithColon()
nextTokenWithColon in interface JSONLexerpublic final void nextTokenWithChar(char expect)
public final String stringDefaultValue()
public final Number integerValue() throws NumberFormatException
integerValue in interface JSONLexerNumberFormatExceptionpublic final void nextTokenWithColon(int expect)
nextTokenWithColon in interface JSONLexerpublic float floatValue()
floatValue in interface JSONLexerpublic double doubleValue()
public void config(Feature feature, boolean state)
public final boolean isEnabled(Feature feature)
public final boolean isEnabled(int feature)
public final boolean isEnabled(int features,
int feature)
public abstract String numberString()
numberString in interface JSONLexerpublic abstract boolean isEOF()
public final char getCurrent()
getCurrent in interface JSONLexerpublic abstract char charAt(int index)
public final String scanSymbol(SymbolTable symbolTable)
scanSymbol in interface JSONLexerpublic final String scanSymbol(SymbolTable symbolTable, char quote)
scanSymbol in interface JSONLexerpublic final void resetStringPosition()
resetStringPosition in interface JSONLexerpublic final String scanSymbolUnQuoted(SymbolTable symbolTable)
scanSymbolUnQuoted in interface JSONLexerpublic final void scanString()
scanString in interface JSONLexerpublic Calendar getCalendar()
public TimeZone getTimeZone()
getTimeZone in interface JSONLexerpublic void setTimeZone(TimeZone timeZone)
setTimeZone in interface JSONLexerpublic abstract byte[] bytesValue()
bytesValue in interface JSONLexerpublic void close()
public String scanTypeName(SymbolTable symbolTable)
scanTypeName in interface JSONLexerpublic final int scanType(String type)
public final boolean matchField(char[] fieldName)
public int matchField(long fieldNameHash)
public boolean seekArrayToItem(int index)
public int seekObjectToField(long fieldNameHash,
boolean deepScan)
public int seekObjectToField(long[] fieldNameHash)
public int seekObjectToFieldDeepScan(long fieldNameHash)
public void skipObject()
public void skipObject(boolean valid)
public void skipArray()
public abstract int indexOf(char ch,
int startIndex)
public abstract String addSymbol(int offset, int len, int hash, SymbolTable symbolTable)
public String scanFieldString(char[] fieldName)
public String scanString(char expectNextChar)
scanString in interface JSONLexerpublic long scanFieldSymbol(char[] fieldName)
public long scanEnumSymbol(char[] fieldName)
public Enum<?> scanEnum(Class<?> enumClass, SymbolTable symbolTable, char serperator)
public String scanSymbolWithSeperator(SymbolTable symbolTable, char serperator)
scanSymbolWithSeperator in interface JSONLexerpublic Collection<String> newCollectionByType(Class<?> type)
public Collection<String> scanFieldStringArray(char[] fieldName, Class<?> type)
public void scanStringArray(Collection<String> list, char seperator)
scanStringArray in interface JSONLexerpublic int scanFieldInt(char[] fieldName)
public final int[] scanFieldIntArray(char[] fieldName)
public boolean scanBoolean(char expectNext)
scanBoolean in interface JSONLexerpublic boolean scanFieldBoolean(char[] fieldName)
public long scanFieldLong(char[] fieldName)
public final float scanFieldFloat(char[] fieldName)
public final float scanFloat(char seperator)
public double scanDouble(char seperator)
scanDouble in interface JSONLexerpublic BigDecimal scanDecimal(char seperator)
scanDecimal in interface JSONLexerpublic final float[] scanFieldFloatArray(char[] fieldName)
public final float[][] scanFieldFloatArray2(char[] fieldName)
public final double scanFieldDouble(char[] fieldName)
public BigDecimal scanFieldDecimal(char[] fieldName)
public BigInteger scanFieldBigInteger(char[] fieldName)
public Date scanFieldDate(char[] fieldName)
public Date scanDate(char seperator)
public UUID scanFieldUUID(char[] fieldName)
public UUID scanUUID(char seperator)
public final void scanTrue()
public final void scanNullOrNew()
public final void scanNullOrNew(boolean acceptColon)
public final void scanFalse()
public final void scanIdent()
public abstract String subString(int offset, int count)
public static String readString(char[] chars, int chars_len)
public boolean isBlankInput()
isBlankInput in interface JSONLexerpublic final void skipWhitespace()
skipWhitespace in interface JSONLexerpublic final void scanHex()
public final void scanNumber()
scanNumber in interface JSONLexerpublic final long longValue()
throws NumberFormatException
longValue in interface JSONLexerNumberFormatExceptionpublic final Number decimalValue(boolean decimal)
decimalValue in interface JSONLexerpublic abstract BigDecimal decimalValue()
decimalValue in interface JSONLexerpublic static boolean isWhitespace(char ch)
public String[] scanFieldStringArray(char[] fieldName, int argTypesCount, SymbolTable typeSymbolTable)
fieldName - argTypesCount - typeSymbolTable - public boolean matchField2(char[] fieldName)
public int getFeatures()
getFeatures in interface JSONLexerpublic void setFeatures(int features)
setFeatures in interface JSONLexerCopyright © 2012–2022 Alibaba Group. All rights reserved.