1 10 11 package com.sun.source.tree; 12 13 27 public interface Tree { 28 29 32 public enum Kind { 33 36 ANNOTATION(AnnotationTree.class), 37 38 41 ARRAY_ACCESS(ArrayAccessTree.class), 42 43 46 ARRAY_TYPE(ArrayTypeTree.class), 47 48 51 ASSERT(AssertTree.class), 52 53 56 ASSIGNMENT(AssignmentTree.class), 57 58 61 BLOCK(BlockTree.class), 62 63 66 BREAK(BreakTree.class), 67 68 71 CASE(CaseTree.class), 72 73 76 CATCH(CatchTree.class), 77 78 81 CLASS(ClassTree.class), 82 83 86 COMPILATION_UNIT(CompilationUnitTree.class), 87 88 91 CONDITIONAL_EXPRESSION(ConditionalExpressionTree.class), 92 93 96 CONTINUE(ContinueTree.class), 97 98 101 DO_WHILE_LOOP(DoWhileLoopTree.class), 102 103 106 ENHANCED_FOR_LOOP(EnhancedForLoopTree.class), 107 108 111 EXPRESSION_STATEMENT(ExpressionStatementTree.class), 112 113 116 MEMBER_SELECT(MemberSelectTree.class), 117 118 121 FOR_LOOP(ForLoopTree.class), 122 123 126 IDENTIFIER(IdentifierTree.class), 127 128 131 IF(IfTree.class), 132 133 136 IMPORT(ImportTree.class), 137 138 141 INSTANCE_OF(InstanceOfTree.class), 142 143 146 LABELED_STATEMENT(LabeledStatementTree.class), 147 148 151 METHOD(MethodTree.class), 152 153 156 METHOD_INVOCATION(MethodInvocationTree.class), 157 158 161 MODIFIERS(ModifiersTree.class), 162 163 166 NEW_ARRAY(NewArrayTree.class), 167 168 171 NEW_CLASS(NewClassTree.class), 172 173 176 PARENTHESIZED(ParenthesizedTree.class), 177 178 181 PRIMITIVE_TYPE(PrimitiveTypeTree.class), 182 183 186 RETURN(ReturnTree.class), 187 188 191 EMPTY_STATEMENT(EmptyStatementTree.class), 192 193 196 SWITCH(SwitchTree.class), 197 198 201 SYNCHRONIZED(SynchronizedTree.class), 202 203 206 THROW(ThrowTree.class), 207 208 211 TRY(TryTree.class), 212 213 216 PARAMETERIZED_TYPE(ParameterizedTypeTree.class), 217 218 221 TYPE_CAST(TypeCastTree.class), 222 223 226 TYPE_PARAMETER(TypeParameterTree.class), 227 228 231 VARIABLE(VariableTree.class), 232 233 236 WHILE_LOOP(WhileLoopTree.class), 237 238 242 POSTFIX_INCREMENT(UnaryTree.class), 243 244 248 POSTFIX_DECREMENT(UnaryTree.class), 249 250 254 PREFIX_INCREMENT(UnaryTree.class), 255 256 260 PREFIX_DECREMENT(UnaryTree.class), 261 262 266 UNARY_PLUS(UnaryTree.class), 267 268 272 UNARY_MINUS(UnaryTree.class), 273 274 278 BITWISE_COMPLEMENT(UnaryTree.class), 279 280 284 LOGICAL_COMPLEMENT(UnaryTree.class), 285 286 290 MULTIPLY(BinaryTree.class), 291 292 296 DIVIDE(BinaryTree.class), 297 298 302 REMAINDER(BinaryTree.class), 303 304 308 PLUS(BinaryTree.class), 309 310 314 MINUS(BinaryTree.class), 315 316 320 LEFT_SHIFT(BinaryTree.class), 321 322 326 RIGHT_SHIFT(BinaryTree.class), 327 328 332 UNSIGNED_RIGHT_SHIFT(BinaryTree.class), 333 334 338 LESS_THAN(BinaryTree.class), 339 340 344 GREATER_THAN(BinaryTree.class), 345 346 350 LESS_THAN_EQUAL(BinaryTree.class), 351 352 356 GREATER_THAN_EQUAL(BinaryTree.class), 357 358 362 EQUAL_TO(BinaryTree.class), 363 364 368 NOT_EQUAL_TO(BinaryTree.class), 369 370 374 AND(BinaryTree.class), 375 376 380 XOR(BinaryTree.class), 381 382 386 OR(BinaryTree.class), 387 388 392 CONDITIONAL_AND(BinaryTree.class), 393 394 398 CONDITIONAL_OR(BinaryTree.class), 399 400 404 MULTIPLY_ASSIGNMENT(CompoundAssignmentTree.class), 405 406 410 DIVIDE_ASSIGNMENT(CompoundAssignmentTree.class), 411 412 416 REMAINDER_ASSIGNMENT(CompoundAssignmentTree.class), 417 418 422 PLUS_ASSIGNMENT(CompoundAssignmentTree.class), 423 424 428 MINUS_ASSIGNMENT(CompoundAssignmentTree.class), 429 430 434 LEFT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class), 435 436 440 RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class), 441 442 446 UNSIGNED_RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class), 447 448 452 AND_ASSIGNMENT(CompoundAssignmentTree.class), 453 454 458 XOR_ASSIGNMENT(CompoundAssignmentTree.class), 459 460 464 OR_ASSIGNMENT(CompoundAssignmentTree.class), 465 466 470 INT_LITERAL(LiteralTree.class), 471 472 476 LONG_LITERAL(LiteralTree.class), 477 478 482 FLOAT_LITERAL(LiteralTree.class), 483 484 488 DOUBLE_LITERAL(LiteralTree.class), 489 490 494 BOOLEAN_LITERAL(LiteralTree.class), 495 496 500 CHAR_LITERAL(LiteralTree.class), 501 502 506 STRING_LITERAL(LiteralTree.class), 507 508 512 NULL_LITERAL(LiteralTree.class), 513 514 518 UNBOUNDED_WILDCARD(WildcardTree.class), 519 520 524 EXTENDS_WILDCARD(WildcardTree.class), 525 526 530 SUPER_WILDCARD(WildcardTree.class), 531 532 535 ERRONEOUS(ErroneousTree.class), 536 537 541 OTHER(null); 542 543 544 Kind(Class <? extends Tree> intf) { 545 associatedInterface = intf; 546 } 547 548 public Class <? extends Tree> asInterface() { 549 return associatedInterface; 550 } 551 552 private final Class <? extends Tree> associatedInterface; 553 } 554 555 560 Kind getKind(); 561 562 569 <R,D> R accept(TreeVisitor<R,D> visitor, D data); 570 } 571 | Popular Tags |