org.sonar.java.ast.api
Enum JavaTokenType

java.lang.Object
  extended by java.lang.Enum<JavaTokenType>
      extended by org.sonar.java.ast.api.JavaTokenType
All Implemented Interfaces:
com.sonar.sslr.api.AstNodeType, com.sonar.sslr.api.TokenType, Serializable, Comparable<JavaTokenType>, org.sonar.sslr.grammar.GrammarRuleKey

public enum JavaTokenType
extends Enum<JavaTokenType>
implements com.sonar.sslr.api.TokenType, org.sonar.sslr.grammar.GrammarRuleKey


Enum Constant Summary
CHARACTER_LITERAL
           
DOUBLE_LITERAL
           
FLOAT_LITERAL
           
IDENTIFIER
           
INTEGER_LITERAL
           
LITERAL
           
LONG_LITERAL
           
 
Method Summary
 String getName()
           
 String getValue()
           
 boolean hasToBeSkippedFromAst(com.sonar.sslr.api.AstNode node)
           
static JavaTokenType valueOf(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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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

LITERAL

public static final JavaTokenType 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 name
NullPointerException - if the argument is null

getName

public String getName()
Specified by:
getName in interface com.sonar.sslr.api.TokenType

getValue

public String getValue()
Specified by:
getValue in interface com.sonar.sslr.api.TokenType

hasToBeSkippedFromAst

public boolean hasToBeSkippedFromAst(com.sonar.sslr.api.AstNode node)
Specified by:
hasToBeSkippedFromAst in interface com.sonar.sslr.api.TokenType


Copyright © 2012-2014 SonarSource. All Rights Reserved.