Top Description Fields Constructors Methods
org.codehaus.janino

public final Enum TokenType

extends Enum<TokenType>
Class Inheritance

Enumeration of the types of Tokens that the Scanner produces.

Field Summary

Modifier and TypeField and Description
public static final TokenType
BOOLEAN_LITERAL

The token represents a boolean literal; its Token#value is either 'true' or 'false'.

public static final TokenType
C_PLUS_PLUS_STYLE_COMMENT

The token represents a C++-style comment like "// This is a C++-style comment.

public static final TokenType
C_STYLE_COMMENT

The token represents a C-style comment, like "/* This is a C-style comment.

public static final TokenType
CHARACTER_LITERAL

The token represents a character literal; its Token#value is the text of the character literal exactly as it appears in the source code (including the single quotes around it).

public static final TokenType
END_OF_INPUT

Indicates the "end-of-input" condition.

public static final TokenType
FLOATING_POINT_LITERAL

The token represents a floating-point literal; its Token#value is the text of the floating-point literal exactly as it appears in the source code (e.g. "1.23", "1.23F", "1.23D", "1.", ".1", "1E13").

public static final TokenType
IDENTIFIER

The token represents a Java identifier.

public static final TokenType
INTEGER_LITERAL

The token represents an integer literal; its Token#value is the text of the integer literal exactly as it appears in the source code (e.g. "0", "123", "123L", "03ff", "0xffff", "0b10101010").

public static final TokenType
KEYWORD

The token represents a Java keyword.

public static final TokenType
NULL_LITERAL

The token represents the null literal; its Token#value is 'null'.

public static final TokenType
OPERATOR

The token represents an operator; its Token#value is exactly the particular operator (e.g. "<<<=").

public static final TokenType
STRING_LITERAL

The token represents a string literal; its Token#value is the text of the string literal exactly as it appears in the source code (including the double quotes around it).

public static final TokenType
TEXT_BLOCK

The token represents a text block; its Token#value is the text of the text block exactly as it appears in the source code (including the leading and trailing """).

public static final TokenType
WHITE_SPACE

The token represents "white space"; i.e. a non-empty sequence of whitespace characters.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static TokenType
public static TokenType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BOOLEAN_LITERALback to summary
public static final TokenType BOOLEAN_LITERAL

The token represents a boolean literal; its Token#value is either 'true' or 'false'.

C_PLUS_PLUS_STYLE_COMMENTback to summary
public static final TokenType C_PLUS_PLUS_STYLE_COMMENT

The token represents a C++-style comment like "// This is a C++-style comment.". Notice that the line terminator is not part of the comment; hence, this token is always followed by a WHITE_SPACE token (or by END_OF_INPUT).

C_STYLE_COMMENTback to summary
public static final TokenType C_STYLE_COMMENT

The token represents a C-style comment, like "/* This is a C-style comment. */", which may span multiple lines. In the latter case, the enclosed line terminators appear exactly as in the input stream.

CHARACTER_LITERALback to summary
public static final TokenType CHARACTER_LITERAL

The token represents a character literal; its Token#value is the text of the character literal exactly as it appears in the source code (including the single quotes around it).

END_OF_INPUTback to summary
public static final TokenType END_OF_INPUT

Indicates the "end-of-input" condition.

FLOATING_POINT_LITERALback to summary
public static final TokenType FLOATING_POINT_LITERAL

The token represents a floating-point literal; its Token#value is the text of the floating-point literal exactly as it appears in the source code (e.g. "1.23", "1.23F", "1.23D", "1.", ".1", "1E13").

IDENTIFIERback to summary
public static final TokenType IDENTIFIER

The token represents a Java identifier.

INTEGER_LITERALback to summary
public static final TokenType INTEGER_LITERAL

The token represents an integer literal; its Token#value is the text of the integer literal exactly as it appears in the source code (e.g. "0", "123", "123L", "03ff", "0xffff", "0b10101010").

KEYWORDback to summary
public static final TokenType KEYWORD

The token represents a Java keyword. ("true", "false" and "null" are not Java keywords, but BOOLEAN_LITERALs and NULL_LITERALs.)

NULL_LITERALback to summary
public static final TokenType NULL_LITERAL

The token represents the null literal; its Token#value is 'null'.

OPERATORback to summary
public static final TokenType OPERATOR

The token represents an operator; its Token#value is exactly the particular operator (e.g. "<<<=").

STRING_LITERALback to summary
public static final TokenType STRING_LITERAL

The token represents a string literal; its Token#value is the text of the string literal exactly as it appears in the source code (including the double quotes around it).

TEXT_BLOCKback to summary
public static final TokenType TEXT_BLOCK

The token represents a text block; its Token#value is the text of the text block exactly as it appears in the source code (including the leading and trailing """).

WHITE_SPACEback to summary
public static final TokenType WHITE_SPACE

The token represents "white space"; i.e. a non-empty sequence of whitespace characters. Specifically, any line terminators appear exactly as in the input stream. JLS8 3.6

Constructor Detail

TokenTypeback to summary
private TokenType()

Method Detail

valueOfback to summary
public static TokenType valueOf(String name)
valuesback to summary
public static TokenType[] values()