public enum LiteralKind extends Enum<LiteralKind>
These correspond to the *_LITERAL constants in Tree.Kind
. However,
that enum is in the tools.jar which is not on the user's classpath by default. So this enum is
used instead.
Enum Constant and Description |
---|
ALL
Shorthand for all other LiteralKind constants, other than PRIMITIVE
|
BOOLEAN
Corresponds to
Tree.Kind.BOOLEAN_LITERAL trees |
CHAR
Corresponds to
Tree.Kind.CHAR_LITERAL trees |
DOUBLE
Corresponds to
Tree.Kind.DOUBLE_LITERAL trees |
FLOAT
Corresponds to
Tree.Kind.FLOAT_LITERAL trees |
INT
Corresponds to
Tree.Kind.INT_LITERAL trees |
LONG
Corresponds to
Tree.Kind.LONG_LITERAL trees |
NULL
Corresponds to
Tree.Kind.NULL_LITERAL trees |
PRIMITIVE
Shorthand for all primitive LiteralKind constants: INT, LONG, FLOAT, DOUBLE, BOOLEAN, CHAR
|
STRING
Corresponds to
Tree.Kind.STRING_LITERAL trees |
Modifier and Type | Method and Description |
---|---|
static List<LiteralKind> |
allLiteralKinds()
Returns all LiteralKinds except for ALL and PRIMITIVE
|
static List<LiteralKind> |
primitiveLiteralKinds()
Returns the primitive
LiteralKind s: INT, LONG, FLOAT, DOUBLE, BOOLEAN, CHAR |
static LiteralKind |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LiteralKind[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LiteralKind NULL
Tree.Kind.NULL_LITERAL
treespublic static final LiteralKind INT
Tree.Kind.INT_LITERAL
treespublic static final LiteralKind LONG
Tree.Kind.LONG_LITERAL
treespublic static final LiteralKind FLOAT
Tree.Kind.FLOAT_LITERAL
treespublic static final LiteralKind DOUBLE
Tree.Kind.DOUBLE_LITERAL
treespublic static final LiteralKind BOOLEAN
Tree.Kind.BOOLEAN_LITERAL
treespublic static final LiteralKind CHAR
Tree.Kind.CHAR_LITERAL
treespublic static final LiteralKind STRING
Tree.Kind.STRING_LITERAL
treespublic static final LiteralKind ALL
public static final LiteralKind PRIMITIVE
public static LiteralKind[] values()
for (LiteralKind c : LiteralKind.values()) System.out.println(c);
public static LiteralKind valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static List<LiteralKind> allLiteralKinds()
public static List<LiteralKind> primitiveLiteralKinds()
LiteralKind
s: INT, LONG, FLOAT, DOUBLE, BOOLEAN, CHAR