groovy.json
Enum JsonTokenType
java.lang.Object
java.lang.Enum<JsonTokenType>
groovy.json.JsonTokenType
- All Implemented Interfaces:
- Serializable, Comparable<JsonTokenType>
public enum JsonTokenType
- extends Enum<JsonTokenType>
Enum listing all the possible JSON tokens that should be recognized by the lexer.
- Since:
- 1.8.0
- Author:
- Guillaume Laforge
OPEN_CURLY
public static final JsonTokenType OPEN_CURLY
CLOSE_CURLY
public static final JsonTokenType CLOSE_CURLY
OPEN_BRACKET
public static final JsonTokenType OPEN_BRACKET
CLOSE_BRACKET
public static final JsonTokenType CLOSE_BRACKET
COLON
public static final JsonTokenType COLON
COMMA
public static final JsonTokenType COMMA
NULL
public static final JsonTokenType NULL
TRUE
public static final JsonTokenType TRUE
FALSE
public static final JsonTokenType FALSE
NUMBER
public static final JsonTokenType NUMBER
STRING
public static final JsonTokenType STRING
values
public static JsonTokenType[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (JsonTokenType c : JsonTokenType.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static JsonTokenType valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name
- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
getLabel
public String getLabel()
getValidator
public Object getValidator()