|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<JsonTokenType>
groovy.json.JsonTokenType
public enum JsonTokenType
Enum listing all the possible JSON tokens that should be recognized by the lexer.
Enum Constant Summary | |
---|---|
CLOSE_BRACKET
|
|
CLOSE_CURLY
|
|
COLON
|
|
COMMA
|
|
FALSE
|
|
NULL
|
|
NUMBER
|
|
OPEN_BRACKET
|
|
OPEN_CURLY
|
|
STRING
Original pattern throws the StackOverflowError for long strings with backslashes. |
|
TRUE
|
Method Summary | |
---|---|
String |
getLabel()
|
Object |
getValidator()
|
boolean |
matching(String input)
Tells if an input string matches a token. |
static JsonTokenType |
startingWith(char c)
Find which JSON value might be starting with a given character |
static JsonTokenType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static JsonTokenType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final JsonTokenType OPEN_CURLY
public static final JsonTokenType CLOSE_CURLY
public static final JsonTokenType OPEN_BRACKET
public static final JsonTokenType CLOSE_BRACKET
public static final JsonTokenType COLON
public static final JsonTokenType COMMA
public static final JsonTokenType NULL
public static final JsonTokenType TRUE
public static final JsonTokenType FALSE
public static final JsonTokenType NUMBER
public static final JsonTokenType STRING
JsonTokenTypeTest#testMatchingLongStringWithBackslashes()
for details.
Method Detail |
---|
public static JsonTokenType[] values()
for (JsonTokenType c : JsonTokenType.values()) System.out.println(c);
public static JsonTokenType valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic boolean matching(String input)
input
- the input string to match
Matching
enum value:
YES
if this is an exact match,
POSSIBLE
if more characters could turn the input string into a valid token,
or NO
if the string cannot possibly match the pattern even with more characters to read.public static JsonTokenType startingWith(char c)
c
- the character
public String getLabel()
public Object getValidator()
|
Copyright © 2003-2012 The Codehaus. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |