com.alibaba.fastjson.parser
类 JSONLexerBase

java.lang.Object
  继承者 com.alibaba.fastjson.parser.JSONLexerBase
所有已实现的接口:
JSONLexer, Closeable
直接已知子类:
JSONReaderScanner, JSONScanner

public abstract class JSONLexerBase
extends Object
implements JSONLexer, Closeable

作者:
wenshao

字段摘要
 int matchStat
           
 
从接口 com.alibaba.fastjson.parser.JSONLexer 继承的字段
ARRAY, END, EOI, NOT_MATCH, NOT_MATCH_NAME, OBJECT, UNKOWN, VALUE
 
构造方法摘要
JSONLexerBase()
           
 
方法摘要
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)
           
 BigDecimal decimalValue()
           
 Number decimalValue(boolean decimal)
           
 double doubleValue()
           
 float floatValue()
           
 int getBufferPosition()
           
 Calendar getCalendar()
           
 char getCurrent()
           
abstract  int indexOf(char ch, int startIndex)
           
 Number integerValue()
           
 int intValue()
           
 boolean isBlankInput()
           
 boolean isEnabled(Feature feature)
           
abstract  boolean isEOF()
           
 boolean isRef()
           
static boolean isWhitespace(char ch)
           
 long longValue()
           
 boolean matchField(char[] fieldName)
           
 int matchStat()
           
abstract  char next()
           
 void nextIdent()
           
 void nextToken()
           
 void nextToken(int expect)
           
 void nextTokenWithChar(char expect)
           
 void nextTokenWithChar(char seperator, int expect)
           
 void nextTokenWithColon()
           
 void nextTokenWithColon(int expect)
           
 void nextTokenWithComma()
           
 void nextTokenWithComma(int expect)
           
abstract  String numberString()
           
 Number numberValue()
           
 int pos()
           
 void resetStringPosition()
           
 boolean scanBoolean(char expectNext)
           
 Enum<?> scanEnum(Class<?> enumClass, SymbolTable symbolTable, char serperator)
           
 void scanFalse()
           
 boolean scanFieldBoolean(char[] fieldName)
           
 double scanFieldDouble(char seperator)
           
 double scanFieldDouble(char[] fieldName)
           
 float scanFieldFloat(char[] fieldName)
           
 int scanFieldInt(char[] fieldName)
           
 long scanFieldLong(char[] fieldName)
           
 String scanFieldString(char[] fieldName)
           
 Collection<String> scanFieldStringArray(char[] fieldName, Class<?> type)
           
 String scanFieldSymbol(char[] fieldName, SymbolTable symbolTable)
           
 float scanFloat(char seperator)
           
 void scanIdent()
           
 int scanInt(char expectNext)
           
 long scanLong(char expectNextChar)
           
 void scanNullOrNew()
           
 void scanNumber()
           
 void scanSet()
           
 void scanString()
           
 String scanString(char expectNextChar)
           
 Collection<String> scanStringArray(Class<?> type, char seperator)
           
 String scanSymbol(SymbolTable symbolTable)
           
 String scanSymbol(SymbolTable symbolTable, char quote)
           
 String scanSymbolUnQuoted(SymbolTable symbolTable)
           
 String scanSymbolWithSeperator(SymbolTable symbolTable, char serperator)
           
 void scanTreeSet()
           
 void scanTrue()
           
 int scanType(String type)
           
 void scanUndefined()
           
 void skipWhitespace()
           
 String stringDefaultValue()
           
abstract  String stringVal()
           
abstract  String subString(int offset, int count)
           
 int token()
           
 String tokenName()
           
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

matchStat

public int matchStat
构造方法详细信息

JSONLexerBase

public JSONLexerBase()
方法详细信息

matchStat

public final int matchStat()

nextToken

public final void nextToken()
指定者:
接口 JSONLexer 中的 nextToken

nextToken

public final void nextToken(int expect)
指定者:
接口 JSONLexer 中的 nextToken

nextIdent

public final void nextIdent()

nextTokenWithColon

public final void nextTokenWithColon()
指定者:
接口 JSONLexer 中的 nextTokenWithColon

nextTokenWithComma

public final void nextTokenWithComma()

nextTokenWithChar

public final void nextTokenWithChar(char expect)

token

public final int token()
指定者:
接口 JSONLexer 中的 token

tokenName

public final String tokenName()
指定者:
接口 JSONLexer 中的 tokenName

pos

public final int pos()
指定者:
接口 JSONLexer 中的 pos

getBufferPosition

public final int getBufferPosition()
指定者:
接口 JSONLexer 中的 getBufferPosition

stringDefaultValue

public final String stringDefaultValue()

integerValue

public final Number integerValue()
                          throws NumberFormatException
指定者:
接口 JSONLexer 中的 integerValue
抛出:
NumberFormatException

nextTokenWithColon

public final void nextTokenWithColon(int expect)
指定者:
接口 JSONLexer 中的 nextTokenWithColon

nextTokenWithComma

public final void nextTokenWithComma(int expect)

nextTokenWithChar

public final void nextTokenWithChar(char seperator,
                                    int expect)

floatValue

public float floatValue()
指定者:
接口 JSONLexer 中的 floatValue

doubleValue

public double doubleValue()

config

public void config(Feature feature,
                   boolean state)
指定者:
接口 JSONLexer 中的 config

isEnabled

public final boolean isEnabled(Feature feature)
指定者:
接口 JSONLexer 中的 isEnabled

numberString

public abstract String numberString()
指定者:
接口 JSONLexer 中的 numberString

isEOF

public abstract boolean isEOF()

getCurrent

public final char getCurrent()
指定者:
接口 JSONLexer 中的 getCurrent

charAt

public abstract char charAt(int index)

next

public abstract char next()
指定者:
接口 JSONLexer 中的 next

scanSymbol

public final String scanSymbol(SymbolTable symbolTable)
指定者:
接口 JSONLexer 中的 scanSymbol

scanSymbol

public final String scanSymbol(SymbolTable symbolTable,
                               char quote)
指定者:
接口 JSONLexer 中的 scanSymbol

resetStringPosition

public final void resetStringPosition()
指定者:
接口 JSONLexer 中的 resetStringPosition

scanSymbolUnQuoted

public final String scanSymbolUnQuoted(SymbolTable symbolTable)
指定者:
接口 JSONLexer 中的 scanSymbolUnQuoted

scanString

public final void scanString()
指定者:
接口 JSONLexer 中的 scanString

getCalendar

public Calendar getCalendar()

intValue

public final int intValue()
指定者:
接口 JSONLexer 中的 intValue

bytesValue

public abstract byte[] bytesValue()
指定者:
接口 JSONLexer 中的 bytesValue

close

public void close()
指定者:
接口 JSONLexer 中的 close
指定者:
接口 Closeable 中的 close

isRef

public final boolean isRef()
指定者:
接口 JSONLexer 中的 isRef

scanType

public int scanType(String type)

matchField

public final boolean matchField(char[] fieldName)

indexOf

public abstract int indexOf(char ch,
                            int startIndex)

addSymbol

public abstract String addSymbol(int offset,
                                 int len,
                                 int hash,
                                 SymbolTable symbolTable)

scanFieldString

public String scanFieldString(char[] fieldName)

scanString

public String scanString(char expectNextChar)
指定者:
接口 JSONLexer 中的 scanString

scanFieldSymbol

public String scanFieldSymbol(char[] fieldName,
                              SymbolTable symbolTable)

scanEnum

public Enum<?> scanEnum(Class<?> enumClass,
                        SymbolTable symbolTable,
                        char serperator)
指定者:
接口 JSONLexer 中的 scanEnum

scanSymbolWithSeperator

public String scanSymbolWithSeperator(SymbolTable symbolTable,
                                      char serperator)
指定者:
接口 JSONLexer 中的 scanSymbolWithSeperator

scanFieldStringArray

public Collection<String> scanFieldStringArray(char[] fieldName,
                                               Class<?> type)

scanStringArray

public Collection<String> scanStringArray(Class<?> type,
                                          char seperator)
指定者:
接口 JSONLexer 中的 scanStringArray

scanFieldInt

public int scanFieldInt(char[] fieldName)

scanBoolean

public boolean scanBoolean(char expectNext)

scanInt

public int scanInt(char expectNext)
指定者:
接口 JSONLexer 中的 scanInt

scanFieldBoolean

public boolean scanFieldBoolean(char[] fieldName)

scanFieldLong

public long scanFieldLong(char[] fieldName)

scanLong

public long scanLong(char expectNextChar)
指定者:
接口 JSONLexer 中的 scanLong

scanFieldFloat

public final float scanFieldFloat(char[] fieldName)

scanFloat

public final float scanFloat(char seperator)

scanFieldDouble

public final double scanFieldDouble(char[] fieldName)

scanFieldDouble

public final double scanFieldDouble(char seperator)

scanTrue

public final void scanTrue()

scanTreeSet

public final void scanTreeSet()

scanNullOrNew

public final void scanNullOrNew()

scanUndefined

public final void scanUndefined()

scanFalse

public final void scanFalse()

scanIdent

public final void scanIdent()

stringVal

public abstract String stringVal()
指定者:
接口 JSONLexer 中的 stringVal

subString

public abstract String subString(int offset,
                                 int count)

isBlankInput

public final boolean isBlankInput()
指定者:
接口 JSONLexer 中的 isBlankInput

skipWhitespace

public final void skipWhitespace()
指定者:
接口 JSONLexer 中的 skipWhitespace

scanSet

public final void scanSet()

scanNumber

public final void scanNumber()
指定者:
接口 JSONLexer 中的 scanNumber

longValue

public final long longValue()
                     throws NumberFormatException
指定者:
接口 JSONLexer 中的 longValue
抛出:
NumberFormatException

decimalValue

public final Number decimalValue(boolean decimal)
指定者:
接口 JSONLexer 中的 decimalValue

decimalValue

public final BigDecimal decimalValue()
指定者:
接口 JSONLexer 中的 decimalValue

numberValue

public final Number numberValue()
指定者:
接口 JSONLexer 中的 numberValue

isWhitespace

public static final boolean isWhitespace(char ch)


Copyright © 2012-2014 Alibaba Group. All Rights Reserved.