- All Implemented Interfaces:
Serializable
,Comparable<Tree.Kind>
,Constable
- Enclosing interface:
- Tree
public static enum Tree.Kind extends Enum<Tree.Kind>
Enumerates all kinds of trees.
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description AND
Used for instances ofBinaryTree
representing bitwise and logical "and"&
.AND_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing bitwise and logical "and" assignment&=
.ANNOTATED_TYPE
Used for instances ofAnnotatedTypeTree
representing annotated types.ANNOTATION
Used for instances ofAnnotationTree
representing declaration annotations.ANNOTATION_TYPE
Used for instances ofClassTree
representing annotation types.ARRAY_ACCESS
Used for instances ofArrayAccessTree
.ARRAY_TYPE
Used for instances ofArrayTypeTree
.ASSERT
Used for instances ofAssertTree
.ASSIGNMENT
Used for instances ofAssignmentTree
.BINDING_PATTERN
Associated with pattern matching for instanceof, a preview feature of the Java language.
Used for instances ofBindingPatternTree
.BITWISE_COMPLEMENT
Used for instances ofUnaryTree
representing bitwise complement operator~
.BLOCK
Used for instances ofBlockTree
.BOOLEAN_LITERAL
Used for instances ofLiteralTree
representing a boolean literal expression of typeboolean
.BREAK
Used for instances ofBreakTree
.CASE
Used for instances ofCaseTree
.CATCH
Used for instances ofCatchTree
.CHAR_LITERAL
Used for instances ofLiteralTree
representing a character literal expression of typechar
.CLASS
Used for instances ofClassTree
representing classes.COMPILATION_UNIT
Used for instances ofCompilationUnitTree
.CONDITIONAL_AND
Used for instances ofBinaryTree
representing conditional-and&&
.CONDITIONAL_EXPRESSION
Used for instances ofConditionalExpressionTree
.CONDITIONAL_OR
Used for instances ofBinaryTree
representing conditional-or||
.CONTINUE
Used for instances ofContinueTree
.DIVIDE
Used for instances ofBinaryTree
representing division/
.DIVIDE_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing division assignment/=
.DO_WHILE_LOOP
Used for instances ofDoWhileLoopTree
.DOUBLE_LITERAL
Used for instances ofLiteralTree
representing a floating-point literal expression of typedouble
.EMPTY_STATEMENT
Used for instances ofEmptyStatementTree
.ENHANCED_FOR_LOOP
Used for instances ofEnhancedForLoopTree
.ENUM
Used for instances ofClassTree
representing enums.EQUAL_TO
Used for instances ofBinaryTree
representing equal-to==
.ERRONEOUS
Used for instances ofErroneousTree
.EXPORTS
Used for instances ofExportsTree
representing exports directives in a module declaration.EXPRESSION_STATEMENT
Used for instances ofExpressionStatementTree
.EXTENDS_WILDCARD
Used for instances ofWildcardTree
representing an extends bounded wildcard type argument.FLOAT_LITERAL
Used for instances ofLiteralTree
representing a floating-point literal expression of typefloat
.FOR_LOOP
Used for instances ofForLoopTree
.GREATER_THAN
Used for instances ofBinaryTree
representing greater-than>
.GREATER_THAN_EQUAL
Used for instances ofBinaryTree
representing greater-than-equal>=
.IDENTIFIER
Used for instances ofIdentifierTree
.IF
Used for instances ofIfTree
.IMPORT
Used for instances ofImportTree
.INSTANCE_OF
Used for instances ofInstanceOfTree
.INT_LITERAL
Used for instances ofLiteralTree
representing an integral literal expression of typeint
.INTERFACE
Used for instances ofClassTree
representing interfaces.INTERSECTION_TYPE
Used for instances ofIntersectionTypeTree
.LABELED_STATEMENT
Used for instances ofLabeledStatementTree
.LAMBDA_EXPRESSION
Used for instances ofLambdaExpressionTree
.LEFT_SHIFT
Used for instances ofBinaryTree
representing left shift<<
.LEFT_SHIFT_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing left shift assignment<<=
.LESS_THAN
Used for instances ofBinaryTree
representing less-than<
.LESS_THAN_EQUAL
Used for instances ofBinaryTree
representing less-than-equal<=
.LOGICAL_COMPLEMENT
Used for instances ofUnaryTree
representing logical complement operator!
.LONG_LITERAL
Used for instances ofLiteralTree
representing an integral literal expression of typelong
.MEMBER_REFERENCE
Used for instances ofMemberReferenceTree
.MEMBER_SELECT
Used for instances ofMemberSelectTree
.METHOD
Used for instances ofMethodTree
.METHOD_INVOCATION
Used for instances ofMethodInvocationTree
.MINUS
Used for instances ofBinaryTree
representing subtraction-
.MINUS_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing subtraction assignment-=
.MODIFIERS
Used for instances ofModifiersTree
.MODULE
Used for instances ofModuleTree
representing module declarations.MULTIPLY
Used for instances ofBinaryTree
representing multiplication*
.MULTIPLY_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing multiplication assignment*=
.NEW_ARRAY
Used for instances ofNewArrayTree
.NEW_CLASS
Used for instances ofNewClassTree
.NOT_EQUAL_TO
Used for instances ofBinaryTree
representing not-equal-to!=
.NULL_LITERAL
Used for instances ofLiteralTree
representing the use ofnull
.OPENS
Used for instances ofExportsTree
representing opens directives in a module declaration.OR
Used for instances ofBinaryTree
representing bitwise and logical "or"|
.OR_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing bitwise and logical "or" assignment|=
.OTHER
An implementation-reserved node.PACKAGE
Used for instances ofPackageTree
.PARAMETERIZED_TYPE
Used for instances ofParameterizedTypeTree
.PARENTHESIZED
Used for instances ofParenthesizedTree
.PLUS
Used for instances ofBinaryTree
representing addition or string concatenation+
.PLUS_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing addition or string concatenation assignment+=
.POSTFIX_DECREMENT
Used for instances ofUnaryTree
representing postfix decrement operator--
.POSTFIX_INCREMENT
Used for instances ofUnaryTree
representing postfix increment operator++
.PREFIX_DECREMENT
Used for instances ofUnaryTree
representing prefix decrement operator--
.PREFIX_INCREMENT
Used for instances ofUnaryTree
representing prefix increment operator++
.PRIMITIVE_TYPE
Used for instances ofPrimitiveTypeTree
.PROVIDES
Used for instances ofProvidesTree
representing provides directives in a module declaration.RECORD
Associated with records, a preview feature of the Java language.
Used for instances ofClassTree
representing records.REMAINDER
Used for instances ofBinaryTree
representing remainder%
.REMAINDER_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing remainder assignment%=
.REQUIRES
Used for instances ofRequiresTree
representing requires directives in a module declaration.RETURN
Used for instances ofReturnTree
.RIGHT_SHIFT
Used for instances ofBinaryTree
representing right shift>>
.RIGHT_SHIFT_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing right shift assignment>>=
.STRING_LITERAL
Used for instances ofLiteralTree
representing a string literal expression of typeString
.SUPER_WILDCARD
Used for instances ofWildcardTree
representing a super bounded wildcard type argument.SWITCH
Used for instances ofSwitchTree
.SWITCH_EXPRESSION
Used for instances ofSwitchExpressionTree
.SYNCHRONIZED
Used for instances ofSynchronizedTree
.THROW
Used for instances ofThrowTree
.TRY
Used for instances ofTryTree
.TYPE_ANNOTATION
Used for instances ofAnnotationTree
representing type annotations.TYPE_CAST
Used for instances ofTypeCastTree
.TYPE_PARAMETER
Used for instances ofTypeParameterTree
.UNARY_MINUS
Used for instances ofUnaryTree
representing unary minus operator-
.UNARY_PLUS
Used for instances ofUnaryTree
representing unary plus operator+
.UNBOUNDED_WILDCARD
Used for instances ofWildcardTree
representing an unbounded wildcard type argument.UNION_TYPE
Used for instances ofUnionTypeTree
.UNSIGNED_RIGHT_SHIFT
Used for instances ofBinaryTree
representing unsigned right shift>>>
.UNSIGNED_RIGHT_SHIFT_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing unsigned right shift assignment>>>=
.USES
Used for instances ofUsesTree
representing uses directives in a module declaration.VARIABLE
Used for instances ofVariableTree
.WHILE_LOOP
Used for instances ofWhileLoopTree
.XOR
Used for instances ofBinaryTree
representing bitwise and logical "xor"^
.XOR_ASSIGNMENT
Used for instances ofCompoundAssignmentTree
representing bitwise and logical "xor" assignment^=
.YIELD
Used for instances ofYieldTree
. -
Method Summary
Modifier and Type Method Description Class<? extends Tree>
asInterface()
Returns the associated interface type that uses this kind.static Tree.Kind
valueOf(String name)
Returns the enum constant of this type with the specified name.static Tree.Kind[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ANNOTATED_TYPE
Used for instances ofAnnotatedTypeTree
representing annotated types. -
ANNOTATION
Used for instances ofAnnotationTree
representing declaration annotations. -
TYPE_ANNOTATION
Used for instances ofAnnotationTree
representing type annotations. -
ARRAY_ACCESS
Used for instances ofArrayAccessTree
. -
ARRAY_TYPE
Used for instances ofArrayTypeTree
. -
ASSERT
Used for instances ofAssertTree
. -
ASSIGNMENT
Used for instances ofAssignmentTree
. -
BLOCK
Used for instances ofBlockTree
. -
BREAK
Used for instances ofBreakTree
. -
CASE
Used for instances ofCaseTree
. -
CATCH
Used for instances ofCatchTree
. -
CLASS
Used for instances ofClassTree
representing classes. -
COMPILATION_UNIT
Used for instances ofCompilationUnitTree
. -
CONDITIONAL_EXPRESSION
Used for instances ofConditionalExpressionTree
. -
CONTINUE
Used for instances ofContinueTree
. -
DO_WHILE_LOOP
Used for instances ofDoWhileLoopTree
. -
ENHANCED_FOR_LOOP
Used for instances ofEnhancedForLoopTree
. -
EXPRESSION_STATEMENT
Used for instances ofExpressionStatementTree
. -
MEMBER_SELECT
Used for instances ofMemberSelectTree
. -
MEMBER_REFERENCE
Used for instances ofMemberReferenceTree
. -
FOR_LOOP
Used for instances ofForLoopTree
. -
IDENTIFIER
Used for instances ofIdentifierTree
. -
IF
Used for instances ofIfTree
. -
IMPORT
Used for instances ofImportTree
. -
INSTANCE_OF
Used for instances ofInstanceOfTree
. -
LABELED_STATEMENT
Used for instances ofLabeledStatementTree
. -
METHOD
Used for instances ofMethodTree
. -
METHOD_INVOCATION
Used for instances ofMethodInvocationTree
. -
MODIFIERS
Used for instances ofModifiersTree
. -
NEW_ARRAY
Used for instances ofNewArrayTree
. -
NEW_CLASS
Used for instances ofNewClassTree
. -
LAMBDA_EXPRESSION
Used for instances ofLambdaExpressionTree
. -
PACKAGE
Used for instances ofPackageTree
.- Since:
- 9
-
PARENTHESIZED
Used for instances ofParenthesizedTree
. -
BINDING_PATTERN
This enum constant is associated with pattern matching for instanceof, a preview feature of the Java language. Preview features may be removed in a future release, or upgraded to permanent features of the Java language.
Used for instances ofBindingPatternTree
.- Since:
- 14
-
PRIMITIVE_TYPE
Used for instances ofPrimitiveTypeTree
. -
RETURN
Used for instances ofReturnTree
. -
EMPTY_STATEMENT
Used for instances ofEmptyStatementTree
. -
SWITCH
Used for instances ofSwitchTree
. -
SWITCH_EXPRESSION
Used for instances ofSwitchExpressionTree
.- Since:
- 12
-
SYNCHRONIZED
Used for instances ofSynchronizedTree
. -
THROW
Used for instances ofThrowTree
. -
TRY
Used for instances ofTryTree
. -
PARAMETERIZED_TYPE
Used for instances ofParameterizedTypeTree
. -
UNION_TYPE
Used for instances ofUnionTypeTree
. -
INTERSECTION_TYPE
Used for instances ofIntersectionTypeTree
. -
TYPE_CAST
Used for instances ofTypeCastTree
. -
TYPE_PARAMETER
Used for instances ofTypeParameterTree
. -
VARIABLE
Used for instances ofVariableTree
. -
WHILE_LOOP
Used for instances ofWhileLoopTree
. -
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!
. -
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>=
. -
EQUAL_TO
Used for instances ofBinaryTree
representing equal-to==
. -
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|=
. -
INT_LITERAL
Used for instances ofLiteralTree
representing an integral literal expression of typeint
. -
LONG_LITERAL
Used for instances ofLiteralTree
representing an integral literal expression of typelong
. -
FLOAT_LITERAL
Used for instances ofLiteralTree
representing a floating-point literal expression of typefloat
. -
DOUBLE_LITERAL
Used for instances ofLiteralTree
representing a floating-point literal expression of typedouble
. -
BOOLEAN_LITERAL
Used for instances ofLiteralTree
representing a boolean literal expression of typeboolean
. -
CHAR_LITERAL
Used for instances ofLiteralTree
representing a character literal expression of typechar
. -
STRING_LITERAL
Used for instances ofLiteralTree
representing a string literal expression of typeString
. -
NULL_LITERAL
Used for instances ofLiteralTree
representing the use ofnull
. -
UNBOUNDED_WILDCARD
Used for instances ofWildcardTree
representing an unbounded wildcard type argument. -
EXTENDS_WILDCARD
Used for instances ofWildcardTree
representing an extends bounded wildcard type argument. -
SUPER_WILDCARD
Used for instances ofWildcardTree
representing a super bounded wildcard type argument. -
ERRONEOUS
Used for instances ofErroneousTree
. -
INTERFACE
Used for instances ofClassTree
representing interfaces. -
ENUM
Used for instances ofClassTree
representing enums. -
ANNOTATION_TYPE
Used for instances ofClassTree
representing annotation types. -
MODULE
Used for instances ofModuleTree
representing module declarations. -
EXPORTS
Used for instances ofExportsTree
representing exports directives in a module declaration. -
OPENS
Used for instances ofExportsTree
representing opens directives in a module declaration. -
PROVIDES
Used for instances ofProvidesTree
representing provides directives in a module declaration. -
RECORD
This enum constant is associated with records, a preview feature of the Java language. Preview features may be removed in a future release, or upgraded to permanent features of the Java language.
Used for instances ofClassTree
representing records.- Since:
- 14
-
REQUIRES
Used for instances ofRequiresTree
representing requires directives in a module declaration. -
USES
Used for instances ofUsesTree
representing uses directives in a module declaration. -
OTHER
An implementation-reserved node. This is the not the node you are looking for. -
YIELD
Used for instances ofYieldTree
.- Since:
- 13
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type 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
-