Package org.sonar.java.ast.api
Enum JavaTokenType
- java.lang.Object
-
- java.lang.Enum<JavaTokenType>
-
- org.sonar.java.ast.api.JavaTokenType
-
- All Implemented Interfaces:
com.sonar.sslr.api.AstNodeType,Serializable,Comparable<JavaTokenType>,org.sonar.sslr.grammar.GrammarRuleKey
public enum JavaTokenType extends Enum<JavaTokenType> implements org.sonar.sslr.grammar.GrammarRuleKey
Type of tokens for java grammar.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CHARACTER_LITERALDOUBLE_LITERALFLOAT_LITERALIDENTIFIERINTEGER_LITERALLONG_LITERALSTRING_LITERAL
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()StringgetValue()static JavaTokenTypevalueOf(String name)Returns the enum constant of this type with the specified name.static JavaTokenType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CHARACTER_LITERAL
public static final JavaTokenType CHARACTER_LITERAL
-
INTEGER_LITERAL
public static final JavaTokenType INTEGER_LITERAL
-
FLOAT_LITERAL
public static final JavaTokenType FLOAT_LITERAL
-
LONG_LITERAL
public static final JavaTokenType LONG_LITERAL
-
DOUBLE_LITERAL
public static final JavaTokenType DOUBLE_LITERAL
-
STRING_LITERAL
public static final JavaTokenType STRING_LITERAL
-
IDENTIFIER
public static final JavaTokenType IDENTIFIER
-
-
Method Detail
-
values
public static JavaTokenType[] 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 (JavaTokenType c : JavaTokenType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JavaTokenType 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 nameNullPointerException- if the argument is null
-
getName
public String getName()
-
getValue
public String getValue()
-
-