Package jsyntaxpane
Enum TokenType
- java.lang.Object
-
- java.lang.Enum<TokenType>
-
- jsyntaxpane.TokenType
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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
-
-
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 namejava.lang.NullPointerException
- if the argument is null
-
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:
-
-