Package org.sonar.java.ast.api
Enum JavaKeyword
- java.lang.Object
-
- java.lang.Enum<JavaKeyword>
-
- org.sonar.java.ast.api.JavaKeyword
-
- All Implemented Interfaces:
com.sonar.sslr.api.AstNodeType
,Serializable
,Comparable<JavaKeyword>
,org.sonar.sslr.grammar.GrammarRuleKey
public enum JavaKeyword extends Enum<JavaKeyword> implements org.sonar.sslr.grammar.GrammarRuleKey
Keywords for java grammar.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABSTRACT
ASSERT
BOOLEAN
BREAK
BYTE
CASE
CATCH
CHAR
CLASS
CONTINUE
DEFAULT
DO
DOUBLE
ELSE
ENUM
EXTENDS
FALSE
FINAL
FINALLY
FLOAT
FOR
IF
IMPLEMENTS
IMPORT
INSTANCEOF
INT
INTERFACE
LONG
NATIVE
NEW
NULL
PACKAGE
PRIVATE
PROTECTED
PUBLIC
RETURN
SHORT
STATIC
STRICTFP
SUPER
SWITCH
SYNCHRONIZED
THIS
THROW
THROWS
TRANSIENT
TRUE
TRY
VOID
VOLATILE
WHILE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
String
getValue()
static String[]
keywordValues()
keywords as String.static JavaKeyword
valueOf(String name)
Returns the enum constant of this type with the specified name.static JavaKeyword[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ASSERT
public static final JavaKeyword ASSERT
-
BREAK
public static final JavaKeyword BREAK
-
CASE
public static final JavaKeyword CASE
-
CATCH
public static final JavaKeyword CATCH
-
CLASS
public static final JavaKeyword CLASS
-
CONTINUE
public static final JavaKeyword CONTINUE
-
DEFAULT
public static final JavaKeyword DEFAULT
-
DO
public static final JavaKeyword DO
-
ELSE
public static final JavaKeyword ELSE
-
ENUM
public static final JavaKeyword ENUM
-
EXTENDS
public static final JavaKeyword EXTENDS
-
FINALLY
public static final JavaKeyword FINALLY
-
FINAL
public static final JavaKeyword FINAL
-
FOR
public static final JavaKeyword FOR
-
IF
public static final JavaKeyword IF
-
IMPLEMENTS
public static final JavaKeyword IMPLEMENTS
-
IMPORT
public static final JavaKeyword IMPORT
-
INTERFACE
public static final JavaKeyword INTERFACE
-
INSTANCEOF
public static final JavaKeyword INSTANCEOF
-
NEW
public static final JavaKeyword NEW
-
PACKAGE
public static final JavaKeyword PACKAGE
-
RETURN
public static final JavaKeyword RETURN
-
STATIC
public static final JavaKeyword STATIC
-
SUPER
public static final JavaKeyword SUPER
-
SWITCH
public static final JavaKeyword SWITCH
-
SYNCHRONIZED
public static final JavaKeyword SYNCHRONIZED
-
THIS
public static final JavaKeyword THIS
-
THROWS
public static final JavaKeyword THROWS
-
THROW
public static final JavaKeyword THROW
-
TRY
public static final JavaKeyword TRY
-
VOID
public static final JavaKeyword VOID
-
WHILE
public static final JavaKeyword WHILE
-
TRUE
public static final JavaKeyword TRUE
-
FALSE
public static final JavaKeyword FALSE
-
NULL
public static final JavaKeyword NULL
-
PUBLIC
public static final JavaKeyword PUBLIC
-
PROTECTED
public static final JavaKeyword PROTECTED
-
PRIVATE
public static final JavaKeyword PRIVATE
-
ABSTRACT
public static final JavaKeyword ABSTRACT
-
NATIVE
public static final JavaKeyword NATIVE
-
TRANSIENT
public static final JavaKeyword TRANSIENT
-
VOLATILE
public static final JavaKeyword VOLATILE
-
STRICTFP
public static final JavaKeyword STRICTFP
-
BYTE
public static final JavaKeyword BYTE
-
SHORT
public static final JavaKeyword SHORT
-
CHAR
public static final JavaKeyword CHAR
-
INT
public static final JavaKeyword INT
-
LONG
public static final JavaKeyword LONG
-
FLOAT
public static final JavaKeyword FLOAT
-
DOUBLE
public static final JavaKeyword DOUBLE
-
BOOLEAN
public static final JavaKeyword BOOLEAN
-
-
Method Detail
-
values
public static JavaKeyword[] 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 (JavaKeyword c : JavaKeyword.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JavaKeyword 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()
-
keywordValues
public static String[] keywordValues()
keywords as String.- Returns:
- an array containing all keywords as typed in Java
-
-