org.sonar.python.api
Enum PythonKeyword

java.lang.Object
  extended by java.lang.Enum<PythonKeyword>
      extended by org.sonar.python.api.PythonKeyword
All Implemented Interfaces:
com.sonar.sslr.api.AstNodeType, com.sonar.sslr.api.TokenType, Serializable, Comparable<PythonKeyword>

public enum PythonKeyword
extends Enum<PythonKeyword>
implements com.sonar.sslr.api.TokenType

http://docs.python.org/reference/lexical_analysis.html#keywords


Enum Constant Summary
AND
          Logical AND.
AS
           
ASSERT
           
BREAK
           
CLASS
           
CONTINUE
           
DEF
           
DEL
           
ELIF
           
ELSE
           
EXCEPT
           
FALSE
           
FINALLY
           
FOR
           
FROM
           
GLOBAL
           
IF
           
IMPORT
           
IN
           
IS
           
LAMBDA
           
NONE
           
NONLOCAL
           
NOT
           
OR
          Logical OR.
PASS
           
RAISE
           
RETURN
           
TRUE
           
TRY
           
WHILE
           
WITH
           
YIELD
           
 
Method Summary
 String getName()
           
 String getValue()
           
 boolean hasToBeSkippedFromAst(com.sonar.sslr.api.AstNode node)
           
static String[] keywordValues()
           
static PythonKeyword valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PythonKeyword[] 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

FALSE

public static final PythonKeyword FALSE

NONE

public static final PythonKeyword NONE

TRUE

public static final PythonKeyword TRUE

AND

public static final PythonKeyword AND
Logical AND.


AS

public static final PythonKeyword AS

ASSERT

public static final PythonKeyword ASSERT

BREAK

public static final PythonKeyword BREAK

CLASS

public static final PythonKeyword CLASS

CONTINUE

public static final PythonKeyword CONTINUE

DEF

public static final PythonKeyword DEF

DEL

public static final PythonKeyword DEL

ELIF

public static final PythonKeyword ELIF

ELSE

public static final PythonKeyword ELSE

EXCEPT

public static final PythonKeyword EXCEPT

FINALLY

public static final PythonKeyword FINALLY

FOR

public static final PythonKeyword FOR

FROM

public static final PythonKeyword FROM

GLOBAL

public static final PythonKeyword GLOBAL

IF

public static final PythonKeyword IF

IMPORT

public static final PythonKeyword IMPORT

IN

public static final PythonKeyword IN

IS

public static final PythonKeyword IS

LAMBDA

public static final PythonKeyword LAMBDA

NONLOCAL

public static final PythonKeyword NONLOCAL

NOT

public static final PythonKeyword NOT

OR

public static final PythonKeyword OR
Logical OR.


PASS

public static final PythonKeyword PASS

RAISE

public static final PythonKeyword RAISE

RETURN

public static final PythonKeyword RETURN

TRY

public static final PythonKeyword TRY

WHILE

public static final PythonKeyword WHILE

WITH

public static final PythonKeyword WITH

YIELD

public static final PythonKeyword YIELD
Method Detail

values

public static PythonKeyword[] 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 (PythonKeyword c : PythonKeyword.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PythonKeyword 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

keywordValues

public static String[] keywordValues()


Copyright © 2011-2012 SonarSource and Waleri Enns. All Rights Reserved.