Enum LiteralKind
- java.lang.Object
-
- java.lang.Enum<LiteralKind>
-
- org.checkerframework.framework.qual.LiteralKind
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<LiteralKind>
public enum LiteralKind extends java.lang.Enum<LiteralKind>
Specifies kinds of literal trees.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. This enum is used by meta-annotations, such asQualifierForLiterals, instead.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLShorthand for all other LiteralKind constants, other than PRIMITIVE.BOOLEANCorresponds toTree.Kind.BOOLEAN_LITERALtrees.CHARCorresponds toTree.Kind.CHAR_LITERALtrees.DOUBLECorresponds toTree.Kind.DOUBLE_LITERALtrees.FLOATCorresponds toTree.Kind.FLOAT_LITERALtrees.INTCorresponds toTree.Kind.INT_LITERALtrees.LONGCorresponds toTree.Kind.LONG_LITERALtrees.NULLCorresponds toTree.Kind.NULL_LITERALtrees.PRIMITIVEShorthand for all primitive LiteralKind constants: INT, LONG, FLOAT, DOUBLE, BOOLEAN, CHAR.STRINGCorresponds toTree.Kind.STRING_LITERALtrees.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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 primitiveLiteralKinds: INT, LONG, FLOAT, DOUBLE, BOOLEAN, CHAR.static LiteralKindvalueOf(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.
-
-
-
Enum Constant Detail
-
NULL
public static final LiteralKind NULL
Corresponds toTree.Kind.NULL_LITERALtrees.
-
INT
public static final LiteralKind INT
Corresponds toTree.Kind.INT_LITERALtrees.
-
LONG
public static final LiteralKind LONG
Corresponds toTree.Kind.LONG_LITERALtrees.
-
FLOAT
public static final LiteralKind FLOAT
Corresponds toTree.Kind.FLOAT_LITERALtrees.
-
DOUBLE
public static final LiteralKind DOUBLE
Corresponds toTree.Kind.DOUBLE_LITERALtrees.
-
BOOLEAN
public static final LiteralKind BOOLEAN
Corresponds toTree.Kind.BOOLEAN_LITERALtrees.
-
CHAR
public static final LiteralKind CHAR
Corresponds toTree.Kind.CHAR_LITERALtrees.
-
STRING
public static final LiteralKind STRING
Corresponds toTree.Kind.STRING_LITERALtrees.
-
ALL
public static final LiteralKind ALL
Shorthand for all other LiteralKind constants, other than PRIMITIVE.
-
PRIMITIVE
public static final LiteralKind PRIMITIVE
Shorthand for all primitive LiteralKind constants: INT, LONG, FLOAT, DOUBLE, BOOLEAN, CHAR.
-
-
Method Detail
-
values
public static LiteralKind[] 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 (LiteralKind c : LiteralKind.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LiteralKind valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
allLiteralKinds
public static java.util.List<LiteralKind> allLiteralKinds()
Returns all LiteralKinds except for ALL and PRIMITIVE (which are shorthands for groups of other LiteralKinds).- Returns:
- list of LiteralKinds except for ALL and PRIMITIVE
-
primitiveLiteralKinds
public static java.util.List<LiteralKind> primitiveLiteralKinds()
Returns the primitiveLiteralKinds: INT, LONG, FLOAT, DOUBLE, BOOLEAN, CHAR. This is all LiteralKinds except for NULL, STRING, and ones that are shorthands for groups of other LiteralKinds.- Returns:
- list of LiteralKinds except for NULL and STRING
-
-