public enum LiteralKind extends java.lang.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 java.util.List<LiteralKind> |
allLiteralKinds()
Returns all LiteralKinds except for ALL and PRIMITIVE (which are shorthands for groups of
other LiteralKinds).
|
static java.util.List<LiteralKind> |
primitiveLiteralKinds()
Returns the primitive
LiteralKind s: INT, LONG, FLOAT, DOUBLE, BOOLEAN, CHAR. |
static LiteralKind |
valueOf(java.lang.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(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 static java.util.List<LiteralKind> allLiteralKinds()
public static java.util.List<LiteralKind> primitiveLiteralKinds()
LiteralKind
s: INT, LONG, FLOAT, DOUBLE, BOOLEAN, CHAR. This is
all LiteralKinds except for NULL, STRING, and ones that are shorthands for groups of other
LiteralKinds.