Groovy 2.2.1

groovy.json
[Java] Enum JsonTokenType

java.lang.Object
  groovy.json.JsonTokenType

public enum JsonTokenType

Enum listing all the possible JSON tokens that should be recognized by the lexer.

Authors:
Guillaume Laforge
Since:
1.8.0


Enum Constant Summary
CLOSE_BRACKET

CLOSE_CURLY

COLON

COMMA

FALSE

NULL

NUMBER

OPEN_BRACKET

OPEN_CURLY

STRING

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

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Enum Constant Detail

CLOSE_BRACKET

JsonTokenType CLOSE_BRACKET


CLOSE_CURLY

JsonTokenType CLOSE_CURLY


COLON

JsonTokenType COLON


COMMA

JsonTokenType COMMA


FALSE

JsonTokenType FALSE


NULL

JsonTokenType NULL


NUMBER

JsonTokenType NUMBER


OPEN_BRACKET

JsonTokenType OPEN_BRACKET


OPEN_CURLY

JsonTokenType OPEN_CURLY


STRING

JsonTokenType STRING


TRUE

JsonTokenType TRUE


 
Method Detail

getLabel

public String getLabel()


getValidator

public Object getValidator()


matching

public boolean matching(String input)
Tells if an input string matches a token.
Parameters:
input - the input string to match
Returns:
a 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.


startingWith

public static JsonTokenType startingWith(char c)
Find which JSON value might be starting with a given character
Parameters:
c - the character
Returns:
the possible token type found


 

Copyright © 2003-2013 The Codehaus. All rights reserved.