- 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 SummaryEnum Constants Enum Constant Description ANDUsed for instances ofBinaryTreerepresenting bitwise and logical "and"&.AND_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting bitwise and logical "and" assignment&=.ANNOTATED_TYPEUsed for instances ofAnnotatedTypeTreerepresenting annotated types.ANNOTATIONUsed for instances ofAnnotationTreerepresenting declaration annotations.ANNOTATION_TYPEUsed for instances ofClassTreerepresenting annotation types.ARRAY_ACCESSUsed for instances ofArrayAccessTree.ARRAY_TYPEUsed for instances ofArrayTypeTree.ASSERTUsed for instances ofAssertTree.ASSIGNMENTUsed for instances ofAssignmentTree.BINDING_PATTERNAssociated with pattern matching for instanceof, a preview feature of the Java language.
 Used for instances ofBindingPatternTree.BITWISE_COMPLEMENTUsed for instances ofUnaryTreerepresenting bitwise complement operator~.BLOCKUsed for instances ofBlockTree.BOOLEAN_LITERALUsed for instances ofLiteralTreerepresenting a boolean literal expression of typeboolean.BREAKUsed for instances ofBreakTree.CASEUsed for instances ofCaseTree.CATCHUsed for instances ofCatchTree.CHAR_LITERALUsed for instances ofLiteralTreerepresenting a character literal expression of typechar.CLASSUsed for instances ofClassTreerepresenting classes.COMPILATION_UNITUsed for instances ofCompilationUnitTree.CONDITIONAL_ANDUsed for instances ofBinaryTreerepresenting conditional-and&&.CONDITIONAL_EXPRESSIONUsed for instances ofConditionalExpressionTree.CONDITIONAL_ORUsed for instances ofBinaryTreerepresenting conditional-or||.CONTINUEUsed for instances ofContinueTree.DIVIDEUsed for instances ofBinaryTreerepresenting division/.DIVIDE_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting division assignment/=.DO_WHILE_LOOPUsed for instances ofDoWhileLoopTree.DOUBLE_LITERALUsed for instances ofLiteralTreerepresenting a floating-point literal expression of typedouble.EMPTY_STATEMENTUsed for instances ofEmptyStatementTree.ENHANCED_FOR_LOOPUsed for instances ofEnhancedForLoopTree.ENUMUsed for instances ofClassTreerepresenting enums.EQUAL_TOUsed for instances ofBinaryTreerepresenting equal-to==.ERRONEOUSUsed for instances ofErroneousTree.EXPORTSUsed for instances ofExportsTreerepresenting exports directives in a module declaration.EXPRESSION_STATEMENTUsed for instances ofExpressionStatementTree.EXTENDS_WILDCARDUsed for instances ofWildcardTreerepresenting an extends bounded wildcard type argument.FLOAT_LITERALUsed for instances ofLiteralTreerepresenting a floating-point literal expression of typefloat.FOR_LOOPUsed for instances ofForLoopTree.GREATER_THANUsed for instances ofBinaryTreerepresenting greater-than>.GREATER_THAN_EQUALUsed for instances ofBinaryTreerepresenting greater-than-equal>=.IDENTIFIERUsed for instances ofIdentifierTree.IFUsed for instances ofIfTree.IMPORTUsed for instances ofImportTree.INSTANCE_OFUsed for instances ofInstanceOfTree.INT_LITERALUsed for instances ofLiteralTreerepresenting an integral literal expression of typeint.INTERFACEUsed for instances ofClassTreerepresenting interfaces.INTERSECTION_TYPEUsed for instances ofIntersectionTypeTree.LABELED_STATEMENTUsed for instances ofLabeledStatementTree.LAMBDA_EXPRESSIONUsed for instances ofLambdaExpressionTree.LEFT_SHIFTUsed for instances ofBinaryTreerepresenting left shift<<.LEFT_SHIFT_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting left shift assignment<<=.LESS_THANUsed for instances ofBinaryTreerepresenting less-than<.LESS_THAN_EQUALUsed for instances ofBinaryTreerepresenting less-than-equal<=.LOGICAL_COMPLEMENTUsed for instances ofUnaryTreerepresenting logical complement operator!.LONG_LITERALUsed for instances ofLiteralTreerepresenting an integral literal expression of typelong.MEMBER_REFERENCEUsed for instances ofMemberReferenceTree.MEMBER_SELECTUsed for instances ofMemberSelectTree.METHODUsed for instances ofMethodTree.METHOD_INVOCATIONUsed for instances ofMethodInvocationTree.MINUSUsed for instances ofBinaryTreerepresenting subtraction-.MINUS_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting subtraction assignment-=.MODIFIERSUsed for instances ofModifiersTree.MODULEUsed for instances ofModuleTreerepresenting module declarations.MULTIPLYUsed for instances ofBinaryTreerepresenting multiplication*.MULTIPLY_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting multiplication assignment*=.NEW_ARRAYUsed for instances ofNewArrayTree.NEW_CLASSUsed for instances ofNewClassTree.NOT_EQUAL_TOUsed for instances ofBinaryTreerepresenting not-equal-to!=.NULL_LITERALUsed for instances ofLiteralTreerepresenting the use ofnull.OPENSUsed for instances ofExportsTreerepresenting opens directives in a module declaration.ORUsed for instances ofBinaryTreerepresenting bitwise and logical "or"|.OR_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting bitwise and logical "or" assignment|=.OTHERAn implementation-reserved node.PACKAGEUsed for instances ofPackageTree.PARAMETERIZED_TYPEUsed for instances ofParameterizedTypeTree.PARENTHESIZEDUsed for instances ofParenthesizedTree.PLUSUsed for instances ofBinaryTreerepresenting addition or string concatenation+.PLUS_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting addition or string concatenation assignment+=.POSTFIX_DECREMENTUsed for instances ofUnaryTreerepresenting postfix decrement operator--.POSTFIX_INCREMENTUsed for instances ofUnaryTreerepresenting postfix increment operator++.PREFIX_DECREMENTUsed for instances ofUnaryTreerepresenting prefix decrement operator--.PREFIX_INCREMENTUsed for instances ofUnaryTreerepresenting prefix increment operator++.PRIMITIVE_TYPEUsed for instances ofPrimitiveTypeTree.PROVIDESUsed for instances ofProvidesTreerepresenting provides directives in a module declaration.RECORDAssociated with records, a preview feature of the Java language.
 Used for instances ofClassTreerepresenting records.REMAINDERUsed for instances ofBinaryTreerepresenting remainder%.REMAINDER_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting remainder assignment%=.REQUIRESUsed for instances ofRequiresTreerepresenting requires directives in a module declaration.RETURNUsed for instances ofReturnTree.RIGHT_SHIFTUsed for instances ofBinaryTreerepresenting right shift>>.RIGHT_SHIFT_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting right shift assignment>>=.STRING_LITERALUsed for instances ofLiteralTreerepresenting a string literal expression of typeString.SUPER_WILDCARDUsed for instances ofWildcardTreerepresenting a super bounded wildcard type argument.SWITCHUsed for instances ofSwitchTree.SWITCH_EXPRESSIONUsed for instances ofSwitchExpressionTree.SYNCHRONIZEDUsed for instances ofSynchronizedTree.THROWUsed for instances ofThrowTree.TRYUsed for instances ofTryTree.TYPE_ANNOTATIONUsed for instances ofAnnotationTreerepresenting type annotations.TYPE_CASTUsed for instances ofTypeCastTree.TYPE_PARAMETERUsed for instances ofTypeParameterTree.UNARY_MINUSUsed for instances ofUnaryTreerepresenting unary minus operator-.UNARY_PLUSUsed for instances ofUnaryTreerepresenting unary plus operator+.UNBOUNDED_WILDCARDUsed for instances ofWildcardTreerepresenting an unbounded wildcard type argument.UNION_TYPEUsed for instances ofUnionTypeTree.UNSIGNED_RIGHT_SHIFTUsed for instances ofBinaryTreerepresenting unsigned right shift>>>.UNSIGNED_RIGHT_SHIFT_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting unsigned right shift assignment>>>=.USESUsed for instances ofUsesTreerepresenting uses directives in a module declaration.VARIABLEUsed for instances ofVariableTree.WHILE_LOOPUsed for instances ofWhileLoopTree.XORUsed for instances ofBinaryTreerepresenting bitwise and logical "xor"^.XOR_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting bitwise and logical "xor" assignment^=.YIELDUsed for instances ofYieldTree.
- 
Method SummaryModifier and Type Method Description Class<? extends Tree>asInterface()Returns the associated interface type that uses this kind.static Tree.KindvalueOf(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_TYPEUsed for instances ofAnnotatedTypeTreerepresenting annotated types.
- 
ANNOTATIONUsed for instances ofAnnotationTreerepresenting declaration annotations.
- 
TYPE_ANNOTATIONUsed for instances ofAnnotationTreerepresenting type annotations.
- 
ARRAY_ACCESSUsed for instances ofArrayAccessTree.
- 
ARRAY_TYPEUsed for instances ofArrayTypeTree.
- 
ASSERTUsed for instances ofAssertTree.
- 
ASSIGNMENTUsed for instances ofAssignmentTree.
- 
BLOCKUsed for instances ofBlockTree.
- 
BREAKUsed for instances ofBreakTree.
- 
CASEUsed for instances ofCaseTree.
- 
CATCHUsed for instances ofCatchTree.
- 
CLASSUsed for instances ofClassTreerepresenting classes.
- 
COMPILATION_UNITUsed for instances ofCompilationUnitTree.
- 
CONDITIONAL_EXPRESSIONUsed for instances ofConditionalExpressionTree.
- 
CONTINUEUsed for instances ofContinueTree.
- 
DO_WHILE_LOOPUsed for instances ofDoWhileLoopTree.
- 
ENHANCED_FOR_LOOPUsed for instances ofEnhancedForLoopTree.
- 
EXPRESSION_STATEMENTUsed for instances ofExpressionStatementTree.
- 
MEMBER_SELECTUsed for instances ofMemberSelectTree.
- 
MEMBER_REFERENCEUsed for instances ofMemberReferenceTree.
- 
FOR_LOOPUsed for instances ofForLoopTree.
- 
IDENTIFIERUsed for instances ofIdentifierTree.
- 
IFUsed for instances ofIfTree.
- 
IMPORTUsed for instances ofImportTree.
- 
INSTANCE_OFUsed for instances ofInstanceOfTree.
- 
LABELED_STATEMENTUsed for instances ofLabeledStatementTree.
- 
METHODUsed for instances ofMethodTree.
- 
METHOD_INVOCATIONUsed for instances ofMethodInvocationTree.
- 
MODIFIERSUsed for instances ofModifiersTree.
- 
NEW_ARRAYUsed for instances ofNewArrayTree.
- 
NEW_CLASSUsed for instances ofNewClassTree.
- 
LAMBDA_EXPRESSIONUsed for instances ofLambdaExpressionTree.
- 
PACKAGEUsed for instances ofPackageTree.- Since:
- 9
 
- 
PARENTHESIZEDUsed for instances ofParenthesizedTree.
- 
BINDING_PATTERNThis 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_TYPEUsed for instances ofPrimitiveTypeTree.
- 
RETURNUsed for instances ofReturnTree.
- 
EMPTY_STATEMENTUsed for instances ofEmptyStatementTree.
- 
SWITCHUsed for instances ofSwitchTree.
- 
SWITCH_EXPRESSIONUsed for instances ofSwitchExpressionTree.- Since:
- 12
 
- 
SYNCHRONIZEDUsed for instances ofSynchronizedTree.
- 
THROWUsed for instances ofThrowTree.
- 
TRYUsed for instances ofTryTree.
- 
PARAMETERIZED_TYPEUsed for instances ofParameterizedTypeTree.
- 
UNION_TYPEUsed for instances ofUnionTypeTree.
- 
INTERSECTION_TYPEUsed for instances ofIntersectionTypeTree.
- 
TYPE_CASTUsed for instances ofTypeCastTree.
- 
TYPE_PARAMETERUsed for instances ofTypeParameterTree.
- 
VARIABLEUsed for instances ofVariableTree.
- 
WHILE_LOOPUsed for instances ofWhileLoopTree.
- 
POSTFIX_INCREMENTUsed for instances ofUnaryTreerepresenting postfix increment operator++.
- 
POSTFIX_DECREMENTUsed for instances ofUnaryTreerepresenting postfix decrement operator--.
- 
PREFIX_INCREMENTUsed for instances ofUnaryTreerepresenting prefix increment operator++.
- 
PREFIX_DECREMENTUsed for instances ofUnaryTreerepresenting prefix decrement operator--.
- 
UNARY_PLUSUsed for instances ofUnaryTreerepresenting unary plus operator+.
- 
UNARY_MINUSUsed for instances ofUnaryTreerepresenting unary minus operator-.
- 
BITWISE_COMPLEMENTUsed for instances ofUnaryTreerepresenting bitwise complement operator~.
- 
LOGICAL_COMPLEMENTUsed for instances ofUnaryTreerepresenting logical complement operator!.
- 
MULTIPLYUsed for instances ofBinaryTreerepresenting multiplication*.
- 
DIVIDEUsed for instances ofBinaryTreerepresenting division/.
- 
REMAINDERUsed for instances ofBinaryTreerepresenting remainder%.
- 
PLUSUsed for instances ofBinaryTreerepresenting addition or string concatenation+.
- 
MINUSUsed for instances ofBinaryTreerepresenting subtraction-.
- 
LEFT_SHIFTUsed for instances ofBinaryTreerepresenting left shift<<.
- 
RIGHT_SHIFTUsed for instances ofBinaryTreerepresenting right shift>>.
- 
UNSIGNED_RIGHT_SHIFTUsed for instances ofBinaryTreerepresenting unsigned right shift>>>.
- 
LESS_THANUsed for instances ofBinaryTreerepresenting less-than<.
- 
GREATER_THANUsed for instances ofBinaryTreerepresenting greater-than>.
- 
LESS_THAN_EQUALUsed for instances ofBinaryTreerepresenting less-than-equal<=.
- 
GREATER_THAN_EQUALUsed for instances ofBinaryTreerepresenting greater-than-equal>=.
- 
EQUAL_TOUsed for instances ofBinaryTreerepresenting equal-to==.
- 
NOT_EQUAL_TOUsed for instances ofBinaryTreerepresenting not-equal-to!=.
- 
ANDUsed for instances ofBinaryTreerepresenting bitwise and logical "and"&.
- 
XORUsed for instances ofBinaryTreerepresenting bitwise and logical "xor"^.
- 
ORUsed for instances ofBinaryTreerepresenting bitwise and logical "or"|.
- 
CONDITIONAL_ANDUsed for instances ofBinaryTreerepresenting conditional-and&&.
- 
CONDITIONAL_ORUsed for instances ofBinaryTreerepresenting conditional-or||.
- 
MULTIPLY_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting multiplication assignment*=.
- 
DIVIDE_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting division assignment/=.
- 
REMAINDER_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting remainder assignment%=.
- 
PLUS_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting addition or string concatenation assignment+=.
- 
MINUS_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting subtraction assignment-=.
- 
LEFT_SHIFT_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting left shift assignment<<=.
- 
RIGHT_SHIFT_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting right shift assignment>>=.
- 
UNSIGNED_RIGHT_SHIFT_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting unsigned right shift assignment>>>=.
- 
AND_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting bitwise and logical "and" assignment&=.
- 
XOR_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting bitwise and logical "xor" assignment^=.
- 
OR_ASSIGNMENTUsed for instances ofCompoundAssignmentTreerepresenting bitwise and logical "or" assignment|=.
- 
INT_LITERALUsed for instances ofLiteralTreerepresenting an integral literal expression of typeint.
- 
LONG_LITERALUsed for instances ofLiteralTreerepresenting an integral literal expression of typelong.
- 
FLOAT_LITERALUsed for instances ofLiteralTreerepresenting a floating-point literal expression of typefloat.
- 
DOUBLE_LITERALUsed for instances ofLiteralTreerepresenting a floating-point literal expression of typedouble.
- 
BOOLEAN_LITERALUsed for instances ofLiteralTreerepresenting a boolean literal expression of typeboolean.
- 
CHAR_LITERALUsed for instances ofLiteralTreerepresenting a character literal expression of typechar.
- 
STRING_LITERALUsed for instances ofLiteralTreerepresenting a string literal expression of typeString.
- 
NULL_LITERALUsed for instances ofLiteralTreerepresenting the use ofnull.
- 
UNBOUNDED_WILDCARDUsed for instances ofWildcardTreerepresenting an unbounded wildcard type argument.
- 
EXTENDS_WILDCARDUsed for instances ofWildcardTreerepresenting an extends bounded wildcard type argument.
- 
SUPER_WILDCARDUsed for instances ofWildcardTreerepresenting a super bounded wildcard type argument.
- 
ERRONEOUSUsed for instances ofErroneousTree.
- 
INTERFACEUsed for instances ofClassTreerepresenting interfaces.
- 
ENUMUsed for instances ofClassTreerepresenting enums.
- 
ANNOTATION_TYPEUsed for instances ofClassTreerepresenting annotation types.
- 
MODULEUsed for instances ofModuleTreerepresenting module declarations.
- 
EXPORTSUsed for instances ofExportsTreerepresenting exports directives in a module declaration.
- 
OPENSUsed for instances ofExportsTreerepresenting opens directives in a module declaration.
- 
PROVIDESUsed for instances ofProvidesTreerepresenting provides directives in a module declaration.
- 
RECORDThis 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 ofClassTreerepresenting records.- Since:
- 14
 
- 
REQUIRESUsed for instances ofRequiresTreerepresenting requires directives in a module declaration.
- 
USESUsed for instances ofUsesTreerepresenting uses directives in a module declaration.
- 
OTHERAn implementation-reserved node. This is the not the node you are looking for.
- 
YIELDUsed for instances ofYieldTree.- Since:
- 13
 
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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 name
- NullPointerException- if the argument is null
 
- 
asInterfaceReturns the associated interface type that uses this kind.- Returns:
- the associated interface
 
 
-