- All Implemented Interfaces:
Serializable
,Comparable<Tree.Kind>
,Constable
- Enclosing interface:
Tree
Enumerates all kinds of trees.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUsed for instances ofBinaryTree
representing bitwise and logical "and"&
.Used for instances ofCompoundAssignmentTree
representing bitwise and logical "and" assignment&=
.Used for instances ofArrayAccessTree
.Used for instances ofArrayLiteralTree
.Used for instances ofAssignmentTree
.Used for instances ofUnaryTree
representing bitwise complement operator~
.Used for instances ofBlockTree
.Used for instances ofLiteralTree
representing a boolean literal expression of typeboolean
.Used for instances ofBreakTree
.Used for instances ofCaseTree
.Used for instances ofCatchTree
.Used for instances ofClassDeclarationTree
.Used for instances ofClassExpressionTree
.Used for instances ofBinaryTree
representing comma,
.Used for instances ofCompilationUnitTree
.Used for instances ofBinaryTree
representing conditional-and&&
.Used for instances ofConditionalExpressionTree
.Used for instances ofBinaryTree
representing conditional-or||
.Used for instances ofContinueTree
.Used for instances ofDebuggerTree
.Used for instances ofUnaryTree
representing logical delete operatordelete
.Used for instances ofBinaryTree
representing division/
.Used for instances ofCompoundAssignmentTree
representing division assignment/=
.Used for instances ofDoWhileLoopTree
.Used for instances ofEmptyStatementTree
.Used for instances ofBinaryTree
representing equal-to==
.Used for instances ofErroneousTree
.Used for instances ofExportEntryTree
.Used for instances ofExpressionStatementTree
.Used for instances ofForInLoopTree
.Used for instances ofForLoopTree
.Used for instances ofFunctionDeclarationTree
.Used for instances ofFunctionExpressionTree
.Used for instances ofFunctionCallTree
.Used for instances ofBinaryTree
representing greater-than>
.Used for instances ofBinaryTree
representing greater-than-equal>=
.Used for instances ofIdentifierTree
.Used for instances ofIfTree
.Used for instances ofImportEntryTree
.Used for instances ofBinaryTree
representing in operatorin
.Used for instances ofInstanceOfTree
.Used for instances ofLabeledStatementTree
.Used for instances ofBinaryTree
representing left shift<<
.Used for instances ofCompoundAssignmentTree
representing left shift assignment<<=
.Used for instances ofBinaryTree
representing less-than<
.Used for instances ofBinaryTree
representing less-than-equal<=
.Used for instances ofUnaryTree
representing logical complement operator!
.Used for instances ofMemberSelectTree
.Used for instances ofBinaryTree
representing subtraction-
.Used for instances ofCompoundAssignmentTree
representing subtraction assignment-=
.Used for instances ofModuleTree
.Used for instances ofBinaryTree
representing multiplication*
.Used for instances ofCompoundAssignmentTree
representing multiplication assignment*=
.Used for instances ofNewTree
.Used for instances ofBinaryTree
representing not-equal-to!=
.Used for instances ofLiteralTree
representing the use ofnull
.Used for instances ofLiteralTree
representing a number literal expression of typedouble
.Used for instances ofObjectLiteralTree
.Used for instances ofBinaryTree
representing bitwise and logical "or"|
.Used for instances ofCompoundAssignmentTree
representing bitwise and logical "or" assignment|=
.An implementation-reserved node.Used for instances ofParenthesizedTree
.Used for instances ofBinaryTree
representing addition or string concatenation+
.Used for instances ofCompoundAssignmentTree
representing addition or string concatenation assignment+=
.Used for instances ofUnaryTree
representing postfix decrement operator--
.Used for instances ofUnaryTree
representing postfix increment operator++
.Used for instances ofUnaryTree
representing prefix decrement operator--
.Used for instances ofUnaryTree
representing prefix increment operator++
.Used for instances ofPropertyTree
.Used for instances ofRegExpLiteralTree
.Used for instances ofBinaryTree
representing remainder%
.Used for instances ofCompoundAssignmentTree
representing remainder assignment%=
.Used for instances ofReturnTree
.Used for instances ofBinaryTree
representing right shift>>
.Used for instances ofCompoundAssignmentTree
representing right shift assignment>>=
.Used for instances ofSpreadTree
representing spread "operator" for arrays and function call arguments.Used for instances ofBinaryTree
representing equal-to===
.Used for instances ofBinaryTree
representing not-equal-to!==
.Used for instances ofLiteralTree
representing a string literal expression of typeString
.Used for instances ofSwitchTree
.Used for instances ofTemplateLiteralTree
.Used for instances ofThrowTree
.Used for instances ofTryTree
.Used for instances ofUnaryTree
representing logical typeof operatortypeof
.Used for instances ofUnaryTree
representing unary minus operator-
.Used for instances ofUnaryTree
representing unary plus operator+
.Used for instances ofBinaryTree
representing unsigned right shift>>>
.Used for instances ofCompoundAssignmentTree
representing unsigned right shift assignment>>>=
.Used for instances ofVariableTree
.Used for instances ofUnaryTree
representing logical void operatorvoid
.Used for instances ofWhileLoopTree
.Used for instances ofWithTree
.Used for instances ofBinaryTree
representing bitwise and logical "xor"^
.Used for instances ofCompoundAssignmentTree
representing bitwise and logical "xor" assignment^=
.Used for instances ofYieldTree
representing (generator) yield expressionyield expr
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the associated interface type that uses this kind.boolean
Returns if this is an expression tree kind or not.boolean
Returns if this is a literal tree kind or not.boolean
Returns if this is a statement tree kind or not.static Tree.Kind
Returns the enum constant of this class with the specified name.static Tree.Kind[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ARRAY_ACCESS
Used for instances ofArrayAccessTree
. -
ARRAY_LITERAL
Used for instances ofArrayLiteralTree
. -
ASSIGNMENT
Used for instances ofAssignmentTree
. -
BLOCK
Used for instances ofBlockTree
. -
BREAK
Used for instances ofBreakTree
. -
CLASS
Used for instances ofClassDeclarationTree
. -
CLASS_EXPRESSION
Used for instances ofClassExpressionTree
. -
CASE
Used for instances ofCaseTree
. -
CATCH
Used for instances ofCatchTree
. -
COMPILATION_UNIT
Used for instances ofCompilationUnitTree
. -
CONDITIONAL_EXPRESSION
Used for instances ofConditionalExpressionTree
. -
CONTINUE
Used for instances ofContinueTree
. -
DO_WHILE_LOOP
Used for instances ofDoWhileLoopTree
. -
DEBUGGER
Used for instances ofDebuggerTree
. -
FOR_IN_LOOP
Used for instances ofForInLoopTree
. -
FUNCTION_EXPRESSION
Used for instances ofFunctionExpressionTree
. -
ERROR
Used for instances ofErroneousTree
. -
EXPRESSION_STATEMENT
Used for instances ofExpressionStatementTree
. -
MEMBER_SELECT
Used for instances ofMemberSelectTree
. -
FOR_LOOP
Used for instances ofForLoopTree
. -
IDENTIFIER
Used for instances ofIdentifierTree
. -
IF
Used for instances ofIfTree
. -
INSTANCE_OF
Used for instances ofInstanceOfTree
. -
LABELED_STATEMENT
Used for instances ofLabeledStatementTree
. -
MODULE
Used for instances ofModuleTree
. -
EXPORT_ENTRY
Used for instances ofExportEntryTree
. -
IMPORT_ENTRY
Used for instances ofImportEntryTree
. -
FUNCTION
Used for instances ofFunctionDeclarationTree
. -
FUNCTION_INVOCATION
Used for instances ofFunctionCallTree
. -
NEW
Used for instances ofNewTree
. -
OBJECT_LITERAL
Used for instances ofObjectLiteralTree
. -
PARENTHESIZED
Used for instances ofParenthesizedTree
. -
PROPERTY
Used for instances ofPropertyTree
. -
REGEXP_LITERAL
Used for instances ofRegExpLiteralTree
. -
TEMPLATE_LITERAL
Used for instances ofTemplateLiteralTree
. -
RETURN
Used for instances ofReturnTree
. -
EMPTY_STATEMENT
Used for instances ofEmptyStatementTree
. -
SWITCH
Used for instances ofSwitchTree
. -
THROW
Used for instances ofThrowTree
. -
TRY
Used for instances ofTryTree
. -
VARIABLE
Used for instances ofVariableTree
. -
WHILE_LOOP
Used for instances ofWhileLoopTree
. -
WITH
Used for instances ofWithTree
. -
POSTFIX_INCREMENT
Used for instances ofUnaryTree
representing postfix increment operator++
. -
POSTFIX_DECREMENT
Used for instances ofUnaryTree
representing postfix decrement operator--
. -
PREFIX_INCREMENT
Used for instances ofUnaryTree
representing prefix increment operator++
. -
PREFIX_DECREMENT
Used for instances ofUnaryTree
representing prefix decrement operator--
. -
UNARY_PLUS
Used for instances ofUnaryTree
representing unary plus operator+
. -
UNARY_MINUS
Used for instances ofUnaryTree
representing unary minus operator-
. -
BITWISE_COMPLEMENT
Used for instances ofUnaryTree
representing bitwise complement operator~
. -
LOGICAL_COMPLEMENT
Used for instances ofUnaryTree
representing logical complement operator!
. -
DELETE
Used for instances ofUnaryTree
representing logical delete operatordelete
. -
TYPEOF
Used for instances ofUnaryTree
representing logical typeof operatortypeof
. -
VOID
Used for instances ofUnaryTree
representing logical void operatorvoid
. -
COMMA
Used for instances ofBinaryTree
representing comma,
. -
MULTIPLY
Used for instances ofBinaryTree
representing multiplication*
. -
DIVIDE
Used for instances ofBinaryTree
representing division/
. -
REMAINDER
Used for instances ofBinaryTree
representing remainder%
. -
PLUS
Used for instances ofBinaryTree
representing addition or string concatenation+
. -
MINUS
Used for instances ofBinaryTree
representing subtraction-
. -
LEFT_SHIFT
Used for instances ofBinaryTree
representing left shift<<
. -
RIGHT_SHIFT
Used for instances ofBinaryTree
representing right shift>>
. -
UNSIGNED_RIGHT_SHIFT
Used for instances ofBinaryTree
representing unsigned right shift>>>
. -
LESS_THAN
Used for instances ofBinaryTree
representing less-than<
. -
GREATER_THAN
Used for instances ofBinaryTree
representing greater-than>
. -
LESS_THAN_EQUAL
Used for instances ofBinaryTree
representing less-than-equal<=
. -
GREATER_THAN_EQUAL
Used for instances ofBinaryTree
representing greater-than-equal>=
. -
IN
Used for instances ofBinaryTree
representing in operatorin
. -
EQUAL_TO
Used for instances ofBinaryTree
representing equal-to==
. -
NOT_EQUAL_TO
Used for instances ofBinaryTree
representing not-equal-to!=
. -
STRICT_EQUAL_TO
Used for instances ofBinaryTree
representing equal-to===
. -
STRICT_NOT_EQUAL_TO
Used for instances ofBinaryTree
representing not-equal-to!==
. -
AND
Used for instances ofBinaryTree
representing bitwise and logical "and"&
. -
XOR
Used for instances ofBinaryTree
representing bitwise and logical "xor"^
. -
OR
Used for instances ofBinaryTree
representing bitwise and logical "or"|
. -
CONDITIONAL_AND
Used for instances ofBinaryTree
representing conditional-and&&
. -
CONDITIONAL_OR
Used for instances ofBinaryTree
representing conditional-or||
. -
MULTIPLY_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing multiplication assignment*=
. -
DIVIDE_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing division assignment/=
. -
REMAINDER_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing remainder assignment%=
. -
PLUS_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing addition or string concatenation assignment+=
. -
MINUS_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing subtraction assignment-=
. -
LEFT_SHIFT_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing left shift assignment<<=
. -
RIGHT_SHIFT_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing right shift assignment>>=
. -
UNSIGNED_RIGHT_SHIFT_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing unsigned right shift assignment>>>=
. -
AND_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing bitwise and logical "and" assignment&=
. -
XOR_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing bitwise and logical "xor" assignment^=
. -
OR_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing bitwise and logical "or" assignment|=
. -
SPREAD
Used for instances ofSpreadTree
representing spread "operator" for arrays and function call arguments. -
YIELD
Used for instances ofYieldTree
representing (generator) yield expressionyield expr
. -
NUMBER_LITERAL
Used for instances ofLiteralTree
representing a number literal expression of typedouble
. -
BOOLEAN_LITERAL
Used for instances ofLiteralTree
representing a boolean literal expression of typeboolean
. -
STRING_LITERAL
Used for instances ofLiteralTree
representing a string literal expression of typeString
. -
NULL_LITERAL
Used for instances ofLiteralTree
representing the use ofnull
. -
OTHER
An implementation-reserved node. This is the not the node you are looking for.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
asInterface
Returns the associated interface type that uses this kind.- Returns:
- the associated interface
-
isLiteral
public boolean isLiteral()Returns if this is a literal tree kind or not.- Returns:
- true if this is a literal tree kind, false otherwise
-
isExpression
public boolean isExpression()Returns if this is an expression tree kind or not.- Returns:
- true if this is an expression tree kind, false otherwise
-
isStatement
public boolean isStatement()Returns if this is a statement tree kind or not.- Returns:
- true if this is a statement tree kind, false otherwise
-