public enum JsonTokenType extends java.lang.Enum<JsonTokenType>
Enum Constant and Description |
---|
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 |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLabel() |
java.lang.Object |
getValidator() |
boolean |
matching(java.lang.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(java.lang.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.
|
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
public static JsonTokenType[] values()
for (JsonTokenType c : JsonTokenType.values()) System.out.println(c);
public static JsonTokenType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean matching(java.lang.String input)
input
- the input string to matchMatching
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 characterpublic java.lang.String getLabel()
public java.lang.Object getValidator()