jsyntaxpane
Enum TokenType

java.lang.Object
  extended by java.lang.Enum<TokenType>
      extended by jsyntaxpane.TokenType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TokenType>

public enum TokenType
extends java.lang.Enum<TokenType>

These are the various token types supported by JSyntaxPane.

Author:
ayman

Enum Constant Summary
COMBININGRULE
           
COMMENT
           
COMMENT2
           
CONSTANT
           
DEFAULT
           
DELIMITER
           
ERROR
           
IDENTIFIER
           
KEYWORD
           
KEYWORD2
           
NUMBER
           
OPERATOR
           
PARAMETER
           
PREDICATE
           
PREDICATEKEY
           
REGEX
           
REGEX2
           
STRING
           
STRING2
           
TYPE
           
TYPE2
           
TYPE3
           
UNFINISHED
           
VARIABLE
           
WARNING
           
 
Method Summary
 java.lang.String getDescription()
           
 java.lang.String getName()
           
static boolean isComment(Token t)
          Tests if the given token is a Comment Token.
static boolean isKeyword(Token t)
          Tests if the given token is a Keyword Token.
static boolean isString(Token t)
          Tests if the given token is a String Token.
static TokenType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TokenType[] 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

OPERATOR

public static final TokenType OPERATOR

DELIMITER

public static final TokenType DELIMITER

KEYWORD

public static final TokenType KEYWORD

KEYWORD2

public static final TokenType KEYWORD2

IDENTIFIER

public static final TokenType IDENTIFIER

NUMBER

public static final TokenType NUMBER

STRING

public static final TokenType STRING

STRING2

public static final TokenType STRING2

COMMENT

public static final TokenType COMMENT

COMMENT2

public static final TokenType COMMENT2

REGEX

public static final TokenType REGEX

REGEX2

public static final TokenType REGEX2

TYPE

public static final TokenType TYPE

TYPE2

public static final TokenType TYPE2

TYPE3

public static final TokenType TYPE3

DEFAULT

public static final TokenType DEFAULT

WARNING

public static final TokenType WARNING

ERROR

public static final TokenType ERROR

PREDICATE

public static final TokenType PREDICATE

COMBININGRULE

public static final TokenType COMBININGRULE

CONSTANT

public static final TokenType CONSTANT

VARIABLE

public static final TokenType VARIABLE

PREDICATEKEY

public static final TokenType PREDICATEKEY

UNFINISHED

public static final TokenType UNFINISHED

PARAMETER

public static final TokenType PARAMETER
Method Detail

values

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

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

valueOf

public static TokenType 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 name
java.lang.NullPointerException - if the argument is null

getName

public java.lang.String getName()

getDescription

public java.lang.String getDescription()

isComment

public static boolean isComment(Token t)
Tests if the given token is a Comment Token.

Parameters:
t -
Returns:

isKeyword

public static boolean isKeyword(Token t)
Tests if the given token is a Keyword Token.

Parameters:
t -
Returns:

isString

public static boolean isString(Token t)
Tests if the given token is a String Token.

Parameters:
t -
Returns: