public interface JavaTokenTypes
Most separators are 'syntactic sugar' designed to allow easy parsing but not useful in the intermediate form (AST). Such constructs are not supported in this interface. When the AST is output to a Java compilation unit, they will be present. The following are not directly supported:
{ } ] , ; . )
The following operators are rarely used and are not supported at this time:
*= /= &= |= ^= %= <<= >>= >>>=
Some number of 'artificial' tokens are provided to allow the proper
structuring of trees but for which no Java source code would ever be
emitted. Examples include THEN
and BOGUS
.
Modifier and Type | Field and Description |
---|---|
static int |
ANNOTATION
Represents an annotation.
|
static int |
ANON_CTOR
Constructor for an anonymous inner class; text is superclass name
|
static int |
ASSIGN
The assignment operator '='.
|
static int |
BEGIN_DOCTAGS
Beginning of JavaDoc tag range
|
static int |
BITWISE_AND
The bitwise and operator '&'.
|
static int |
BITWISE_OR
The bitwise or operator '|'.
|
static int |
BITWISE_XOR
The bitwise exclusive or operator '^'.
|
static int |
BLOCK
Represents a block of code '{ }' delimited by curly braces.
|
static int |
BLOCK_DEF
Roots Java block contents with a label and other constructs.
|
static int |
BOGUS
A valid token that can be used to root other tokens and which has the
properties of a BLOCK in regards to line ends and indentation but
without emitting any corresponding curly braces or other explicit
artifacts.
|
static int |
BOOL_FALSE
Represents the boolean
false literal. |
static int |
BOOL_TRUE
Represents the boolean
true literal. |
static int |
CAST
Represents a cast operator '( )'.
|
static int |
CHAR_LITERAL
Represents a character literal.
|
static int |
CLASS_REFERENCE
Represents a reference to a class.
|
static int |
COMPILE_UNIT
The root node of any Java compilation unit.
|
static int |
COMPLEMENT
The bitwise complement operator '~'.
|
static int |
CONSTRUCTOR
Represents a special static method call which is a constructor.
|
static int |
CS_BEGIN
Beginning of (exclusive) range of class section anchor point types
|
static int |
CS_CONSTANTS
Anchor point for all static final class constants
|
static int |
CS_CONSTRUCTORS
Anchor point for all constructors
|
static int |
CS_END
End of (exclusive) range of class section anchor point types
|
static int |
CS_INNER_CLASSES
Anchor point for all inner classes
|
static int |
CS_INSTANCE_METHODS
Anchor point for all instance methods
|
static int |
CS_INSTANCE_VARS
Anchor point for all instance variables
|
static int |
CS_STATIC_INITS
Anchor point for all static initializers
|
static int |
CS_STATIC_METHODS
Anchor point for all static methods
|
static int |
CS_STATIC_VARS
Anchor point for all static variables
|
static int |
DEC_LITERAL
Represents a floating point literal.
|
static int |
DECREMENT
The decrement operator '--'.
|
static int |
DIVIDE
The division operator '/'.
|
static int |
DO_WHILE
Allows 'do { } while ();' to be generated cleanly.
|
static int |
DOC_COMMENT
The 'JavaDoc' style comment.
|
static int |
DOC_HTML
Tag which can parent a text run.
|
static int |
DOC_PARAGRAPH
JavaDoc paragraph of text; all textual content is rooted at a
paragraph.
|
static int |
DOC_TEXTRUN
Run of text within a JavaDoc comment; used within paragraph or tags
|
static int |
DOCTAG_CODE
JavaDoc code tag; embedded within a paragraph or other tag.
|
static int |
DOCTAG_LINK
JavaDoc link tag; embedded within a paragraph or other tag.
|
static int |
DOCTAG_PARAM
JavaDoc param tag; text is param name, has text run and tag children
|
static int |
DOCTAG_RETURN
JavaDoc return tag; has text run and tag children
|
static int |
ELSE_IF
Allows 'else if' to be generated without nesting.
|
static int |
END_DOCTAGS
End of JavaDoc tag range
|
static int |
EQUALS
The equivalance operator '=='.
|
static int |
EXPRESSION
Represents an expression.
|
static int |
GT
The greater-than operator '>'.
|
static int |
GTE
The greater-than or equal-to operator '>='.
|
static int |
HEX_LITERAL
Represents a hexadecimal literal.
|
static int |
INCREMENT
The increment operator '++'.
|
static int |
INDENT_GRP
Aggregates nodes and increments the indent level before the first
child node is output and decrements the indent level after the last
child node is output.
|
static int |
INITIALIZER
Represents an array initializer block '{ , , , }' which is delimited by curly braces.
|
static int |
KW_ABSTRACT
The reserved keyword
abstract . |
static int |
KW_ASSERT
The reserved keyword
assert . |
static int |
KW_BOOLEAN
The reserved keyword
boolean . |
static int |
KW_BREAK
The reserved keyword
break . |
static int |
KW_BYTE
The reserved keyword
byte . |
static int |
KW_CASE
The reserved keyword
case . |
static int |
KW_CATCH
The reserved keyword
catch . |
static int |
KW_CHAR
The reserved keyword
char . |
static int |
KW_CLASS
The reserved keyword
class . |
static int |
KW_CONST
The reserved but unused keyword
const . |
static int |
KW_CONTINUE
The reserved keyword
continue . |
static int |
KW_DEFAULT
The reserved keyword
default . |
static int |
KW_DO
The reserved keyword
do . |
static int |
KW_DOUBLE
The reserved keyword
double . |
static int |
KW_ELSE
The reserved keyword
else . |
static int |
KW_ENUM
The reserved keyword
enum . |
static int |
KW_EXTENDS
The reserved keyword
extends . |
static int |
KW_FINAL
The reserved keyword
final . |
static int |
KW_FINALLY
The reserved keyword
finally . |
static int |
KW_FLOAT
The reserved keyword
float . |
static int |
KW_FOR
The reserved keyword
for . |
static int |
KW_GOTO
The reserved but unused keyword
goto . |
static int |
KW_IF
The reserved keyword
if . |
static int |
KW_IMPLEMENTS
The reserved keyword
implements . |
static int |
KW_IMPORT
The reserved keyword
import . |
static int |
KW_INSTANCEOF
The reserved keyword
instanceof . |
static int |
KW_INT
The reserved keyword
int . |
static int |
KW_INTERFACE
The reserved keyword
interface . |
static int |
KW_LONG
The reserved keyword
long . |
static int |
KW_NATIVE
The reserved keyword
native . |
static int |
KW_NEW
The reserved keyword
new . |
static int |
KW_PACKAGE
The reserved keyword
package . |
static int |
KW_PRIVATE
The reserved keyword
private . |
static int |
KW_PROTECTED
The reserved keyword
protected . |
static int |
KW_PUBLIC
The reserved keyword
public . |
static int |
KW_RETURN
The reserved keyword
return . |
static int |
KW_SHORT
The reserved keyword
short . |
static int |
KW_STATIC
The reserved keyword
static . |
static int |
KW_STRICTFP
The reserved keyword
strictfp . |
static int |
KW_SUPER
The reserved keyword
super . |
static int |
KW_SWITCH
The reserved keyword
switch . |
static int |
KW_SYNCHRONIZED
The reserved keyword
synchronized . |
static int |
KW_THIS
The reserved keyword
this . |
static int |
KW_THROW
The reserved keyword
throw . |
static int |
KW_THROWS
The reserved keyword
throws . |
static int |
KW_TRANSIENT
The reserved keyword
transient . |
static int |
KW_TRY
The reserved keyword
try . |
static int |
KW_VOID
The reserved keyword
void . |
static int |
KW_VOLATILE
The reserved keyword
volatile . |
static int |
KW_WHILE
The reserved keyword
while . |
static int |
LABEL
Represents a reference to a previously defined block label.
|
static int |
LABEL_DEF
Represents a block's label.
|
static int |
LAMBDA
Represents a lambda expression.
|
static int |
LBRACKET
The array subscript '[' separator.
|
static int |
LOGICAL_AND
The logical and operator '&&'.
|
static int |
LOGICAL_NOT
The logical not operator '!'.
|
static int |
LOGICAL_OR
The logical or operator '||'.
|
static int |
LPARENS
The left or open parenthesis separator '('.
|
static int |
LSHIFT
The left shift operator '<<'.
|
static int |
LT
The less-than operator '<'.
|
static int |
LTE
The less-than or equal-to operator '<='.
|
static int |
MEMBER
Represents a member reference
|
static int |
METHOD_CALL
Represents an instance method call.
|
static int |
METHOD_DECL
Represents an instance method declaration (signature only, no body)
|
static int |
METHOD_DEF
Represents an instance method definition.
|
static int |
MINUS
The subtraction operator '-'.
|
static int |
MINUS_ASSIGN
The subtract from and assign operator '-='.
|
static int |
MODULO
The modulo operator '%'.
|
static int |
MULTIPLY
The multiplication operator '*'.
|
static int |
NOT_EQ
The not equivalant operator '!='.
|
static int |
NULL_LITERAL
Represents the
null literal. |
static int |
NUM_LITERAL
Represents an integral literal.
|
static int |
OR_ELSE_IF
Allows 'else if' to be aggregated into a single logical test without nesting.
|
static int |
PLACEHOLDER
A valid token that can be used to root other tokens but which is never
emitted as Java source code, nor does it have any impact (positive or
negative) on line ends or indentation.
|
static int |
PLUS
The addition operator '+'.
|
static int |
PLUS_ASSIGN
The add to and assign operator '+='.
|
static int |
REFERENCE
Represents a reference to an instance of a specific object.
|
static int |
REFERENCE_DEF
Represents a definition of an instance of a specific object.
|
static int |
RSHIFT
The right shift operator '>>'.
|
static int |
SKIP
Inserts a blank line and then indents to the same level for the next
output.
|
static int |
SLASH_COMMENT
The 'double slash' style comment.
|
static int |
STAR_COMMENT
The 'slash star' style comment.
|
static int |
STATIC_IMPORT
Represents a static import statement.
|
static int |
STATIC_METHOD_CALL
Represents a static method call.
|
static int |
STRING
Represents a string literal.
|
static int |
SYMBOL
Any valid identifier (that is not a keyword, boolean literal or the null literal).
|
static int |
TERN_IF_ELSE
The ternary if else operator '? :'.
|
static int |
THEN
Allows the primary branch of an 'if' to be rooted properly.
|
static int |
UN_MINUS
The unary minus (negation) operator '-'.
|
static int |
UN_PLUS
The unary plus operator '+'.
|
static int |
UNRECOGNIZED
Represents an unrecognized source construct (this provides a
placeholder to maintain the tree structure).
|
static int |
ZERO_RSHIFT
The zero fill right shift operator '>>>'.
|
static final int COMPILE_UNIT
static final int SLASH_COMMENT
static final int STAR_COMMENT
static final int DOC_COMMENT
static final int SYMBOL
static final int KW_ABSTRACT
abstract
.static final int KW_ASSERT
assert
.static final int KW_BOOLEAN
boolean
.static final int KW_BREAK
break
.static final int KW_BYTE
byte
.static final int KW_CASE
case
.static final int KW_CATCH
catch
.static final int KW_CHAR
char
.static final int KW_CLASS
class
.static final int KW_CONST
const
.static final int KW_CONTINUE
continue
.static final int KW_DEFAULT
default
.static final int KW_DO
do
.static final int KW_DOUBLE
double
.static final int KW_ELSE
else
.static final int KW_ENUM
enum
.static final int KW_EXTENDS
extends
.static final int KW_FINAL
final
.static final int KW_FINALLY
finally
.static final int KW_FLOAT
float
.static final int KW_FOR
for
.static final int KW_GOTO
goto
.static final int KW_IF
if
.static final int KW_IMPLEMENTS
implements
.static final int KW_IMPORT
import
.static final int KW_INSTANCEOF
instanceof
.static final int KW_INT
int
.static final int KW_INTERFACE
interface
.static final int KW_LONG
long
.static final int KW_NATIVE
native
.static final int KW_NEW
new
.static final int KW_PACKAGE
package
.static final int KW_PRIVATE
private
.static final int KW_PROTECTED
protected
.static final int KW_PUBLIC
public
.static final int KW_RETURN
return
.static final int KW_SHORT
short
.static final int KW_STATIC
static
.static final int KW_STRICTFP
strictfp
.static final int KW_SUPER
super
.static final int KW_SWITCH
switch
.static final int KW_SYNCHRONIZED
synchronized
.static final int KW_THIS
this
.static final int KW_THROW
throw
.static final int KW_THROWS
throws
.static final int KW_TRANSIENT
transient
.static final int KW_TRY
try
.static final int KW_VOID
void
.static final int KW_VOLATILE
volatile
.static final int KW_WHILE
while
.static final int BOOL_TRUE
true
literal.static final int BOOL_FALSE
false
literal.static final int NULL_LITERAL
null
literal.static final int NUM_LITERAL
static final int DEC_LITERAL
static final int CHAR_LITERAL
static final int STRING
static final int LPARENS
static final int BLOCK_DEF
static final int BLOCK
static final int LABEL_DEF
static final int LABEL
static final int THEN
static final int ELSE_IF
static final int OR_ELSE_IF
static final int DO_WHILE
static final int EXPRESSION
static final int REFERENCE_DEF
static final int REFERENCE
static final int CLASS_REFERENCE
static final int INITIALIZER
static final int LBRACKET
static final int STATIC_METHOD_CALL
static final int CONSTRUCTOR
static final int METHOD_CALL
static final int METHOD_DEF
static final int METHOD_DECL
static final int MEMBER
static final int ANON_CTOR
static final int STATIC_IMPORT
static final int ANNOTATION
static final int LAMBDA
static final int HEX_LITERAL
static final int CAST
static final int ASSIGN
static final int LT
static final int LTE
static final int GT
static final int GTE
static final int COMPLEMENT
static final int TERN_IF_ELSE
static final int EQUALS
static final int NOT_EQ
static final int INCREMENT
static final int DECREMENT
static final int LOGICAL_NOT
static final int LOGICAL_AND
static final int LOGICAL_OR
static final int BITWISE_AND
static final int BITWISE_OR
static final int BITWISE_XOR
static final int PLUS
static final int MINUS
static final int MULTIPLY
static final int DIVIDE
static final int MODULO
static final int UN_PLUS
static final int UN_MINUS
static final int LSHIFT
static final int RSHIFT
static final int ZERO_RSHIFT
static final int PLUS_ASSIGN
static final int MINUS_ASSIGN
static final int DOC_PARAGRAPH
static final int DOC_TEXTRUN
static final int DOC_HTML
static final int BEGIN_DOCTAGS
static final int DOCTAG_LINK
static final int DOCTAG_PARAM
static final int DOCTAG_RETURN
static final int DOCTAG_CODE
static final int END_DOCTAGS
static final int CS_BEGIN
static final int CS_CONSTANTS
static final int CS_STATIC_VARS
static final int CS_STATIC_INITS
static final int CS_INSTANCE_VARS
static final int CS_CONSTRUCTORS
static final int CS_STATIC_METHODS
static final int CS_INSTANCE_METHODS
static final int CS_INNER_CLASSES
static final int CS_END
static final int SKIP
static final int INDENT_GRP
static final int PLACEHOLDER
static final int BOGUS
static final int UNRECOGNIZED