001//////////////////////////////////////////////////////////////////////////////// 002// checkstyle: Checks Java source code for adherence to a set of rules. 003// Copyright (C) 2001-2019 the original author or authors. 004// 005// This library is free software; you can redistribute it and/or 006// modify it under the terms of the GNU Lesser General Public 007// License as published by the Free Software Foundation; either 008// version 2.1 of the License, or (at your option) any later version. 009// 010// This library is distributed in the hope that it will be useful, 011// but WITHOUT ANY WARRANTY; without even the implied warranty of 012// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013// Lesser General Public License for more details. 014// 015// You should have received a copy of the GNU Lesser General Public 016// License along with this library; if not, write to the Free Software 017// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 018//////////////////////////////////////////////////////////////////////////////// 019 020package com.puppycrawl.tools.checkstyle.api; 021 022import com.puppycrawl.tools.checkstyle.grammar.GeneratedJavaTokenTypes; 023 024/** 025 * Contains the constants for all the tokens contained in the Abstract 026 * Syntax Tree. 027 * 028 * <p>Implementation detail: This class has been introduced to break 029 * the circular dependency between packages.</p> 030 * 031 * @noinspection ClassWithTooManyDependents 032 */ 033public final class TokenTypes { 034 035 /** 036 * The end of file token. This is the root node for the source 037 * file. It's children are an optional package definition, zero 038 * or more import statements, and one or more class or interface 039 * definitions. 040 * 041 * @see #PACKAGE_DEF 042 * @see #IMPORT 043 * @see #CLASS_DEF 044 * @see #INTERFACE_DEF 045 **/ 046 public static final int EOF = GeneratedJavaTokenTypes.EOF; 047 /** 048 * Modifiers for type, method, and field declarations. The 049 * modifiers element is always present even though it may have no 050 * children. 051 * 052 * @see <a 053 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html">Java 054 * Language Specification, §8</a> 055 * @see #LITERAL_PUBLIC 056 * @see #LITERAL_PROTECTED 057 * @see #LITERAL_PRIVATE 058 * @see #ABSTRACT 059 * @see #LITERAL_STATIC 060 * @see #FINAL 061 * @see #LITERAL_TRANSIENT 062 * @see #LITERAL_VOLATILE 063 * @see #LITERAL_SYNCHRONIZED 064 * @see #LITERAL_NATIVE 065 * @see #STRICTFP 066 * @see #ANNOTATION 067 * @see #LITERAL_DEFAULT 068 **/ 069 public static final int MODIFIERS = GeneratedJavaTokenTypes.MODIFIERS; 070 071 /** 072 * An object block. These are children of class, interface, enum, 073 * annotation and enum constant declarations. 074 * Also, object blocks are children of the new keyword when defining 075 * anonymous inner types. 076 * 077 * @see #LCURLY 078 * @see #INSTANCE_INIT 079 * @see #STATIC_INIT 080 * @see #CLASS_DEF 081 * @see #CTOR_DEF 082 * @see #METHOD_DEF 083 * @see #VARIABLE_DEF 084 * @see #RCURLY 085 * @see #INTERFACE_DEF 086 * @see #LITERAL_NEW 087 * @see #ENUM_DEF 088 * @see #ENUM_CONSTANT_DEF 089 * @see #ANNOTATION_DEF 090 **/ 091 public static final int OBJBLOCK = GeneratedJavaTokenTypes.OBJBLOCK; 092 /** 093 * A list of statements. 094 * 095 * @see #RCURLY 096 * @see #EXPR 097 * @see #LABELED_STAT 098 * @see #LITERAL_THROWS 099 * @see #LITERAL_RETURN 100 * @see #SEMI 101 * @see #METHOD_DEF 102 * @see #CTOR_DEF 103 * @see #LITERAL_FOR 104 * @see #LITERAL_WHILE 105 * @see #LITERAL_IF 106 * @see #LITERAL_ELSE 107 * @see #CASE_GROUP 108 **/ 109 public static final int SLIST = GeneratedJavaTokenTypes.SLIST; 110 /** 111 * A constructor declaration. 112 * 113 * <p>For example:</p> 114 * <pre> 115 * public SpecialEntry(int value, String text) 116 * { 117 * this.value = value; 118 * this.text = text; 119 * } 120 * </pre> 121 * <p>parses as:</p> 122 * <pre> 123 * +--CTOR_DEF 124 * | 125 * +--MODIFIERS 126 * | 127 * +--LITERAL_PUBLIC (public) 128 * +--IDENT (SpecialEntry) 129 * +--LPAREN (() 130 * +--PARAMETERS 131 * | 132 * +--PARAMETER_DEF 133 * | 134 * +--MODIFIERS 135 * +--TYPE 136 * | 137 * +--LITERAL_INT (int) 138 * +--IDENT (value) 139 * +--COMMA (,) 140 * +--PARAMETER_DEF 141 * | 142 * +--MODIFIERS 143 * +--TYPE 144 * | 145 * +--IDENT (String) 146 * +--IDENT (text) 147 * +--RPAREN ()) 148 * +--SLIST ({) 149 * | 150 * +--EXPR 151 * | 152 * +--ASSIGN (=) 153 * | 154 * +--DOT (.) 155 * | 156 * +--LITERAL_THIS (this) 157 * +--IDENT (value) 158 * +--IDENT (value) 159 * +--SEMI (;) 160 * +--EXPR 161 * | 162 * +--ASSIGN (=) 163 * | 164 * +--DOT (.) 165 * | 166 * +--LITERAL_THIS (this) 167 * +--IDENT (text) 168 * +--IDENT (text) 169 * +--SEMI (;) 170 * +--RCURLY (}) 171 * </pre> 172 * 173 * @see #OBJBLOCK 174 * @see #CLASS_DEF 175 **/ 176 public static final int CTOR_DEF = GeneratedJavaTokenTypes.CTOR_DEF; 177 /** 178 * A method declaration. The children are modifiers, type parameters, 179 * return type, method name, parameter list, an optional throws list, and 180 * statement list. The statement list is omitted if the method 181 * declaration appears in an interface declaration. Method 182 * declarations may appear inside object blocks of class 183 * declarations, interface declarations, enum declarations, 184 * enum constant declarations or anonymous inner-class declarations. 185 * 186 * <p>For example:</p> 187 * 188 * <pre> 189 * public static int square(int x) 190 * { 191 * return x*x; 192 * } 193 * </pre> 194 * 195 * <p>parses as:</p> 196 * 197 * <pre> 198 * +--METHOD_DEF 199 * | 200 * +--MODIFIERS 201 * | 202 * +--LITERAL_PUBLIC (public) 203 * +--LITERAL_STATIC (static) 204 * +--TYPE 205 * | 206 * +--LITERAL_INT (int) 207 * +--IDENT (square) 208 * +--PARAMETERS 209 * | 210 * +--PARAMETER_DEF 211 * | 212 * +--MODIFIERS 213 * +--TYPE 214 * | 215 * +--LITERAL_INT (int) 216 * +--IDENT (x) 217 * +--SLIST ({) 218 * | 219 * +--LITERAL_RETURN (return) 220 * | 221 * +--EXPR 222 * | 223 * +--STAR (*) 224 * | 225 * +--IDENT (x) 226 * +--IDENT (x) 227 * +--SEMI (;) 228 * +--RCURLY (}) 229 * </pre> 230 * 231 * @see #MODIFIERS 232 * @see #TYPE_PARAMETERS 233 * @see #TYPE 234 * @see #IDENT 235 * @see #PARAMETERS 236 * @see #LITERAL_THROWS 237 * @see #SLIST 238 * @see #OBJBLOCK 239 **/ 240 public static final int METHOD_DEF = GeneratedJavaTokenTypes.METHOD_DEF; 241 /** 242 * A field or local variable declaration. The children are 243 * modifiers, type, the identifier name, and an optional 244 * assignment statement. 245 * 246 * @see #MODIFIERS 247 * @see #TYPE 248 * @see #IDENT 249 * @see #ASSIGN 250 **/ 251 public static final int VARIABLE_DEF = 252 GeneratedJavaTokenTypes.VARIABLE_DEF; 253 254 /** 255 * An instance initializer. Zero or more instance initializers 256 * may appear in class and enum definitions. This token will be a child 257 * of the object block of the declaring type. 258 * 259 * @see <a 260 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.6">Java 261 * Language Specification§8.6</a> 262 * @see #SLIST 263 * @see #OBJBLOCK 264 **/ 265 public static final int INSTANCE_INIT = 266 GeneratedJavaTokenTypes.INSTANCE_INIT; 267 268 /** 269 * A static initialization block. Zero or more static 270 * initializers may be children of the object block of a class 271 * or enum declaration (interfaces cannot have static initializers). The 272 * first and only child is a statement list. 273 * 274 * @see <a 275 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.7">Java 276 * Language Specification, §8.7</a> 277 * @see #SLIST 278 * @see #OBJBLOCK 279 **/ 280 public static final int STATIC_INIT = 281 GeneratedJavaTokenTypes.STATIC_INIT; 282 283 /** 284 * A type. This is either a return type of a method or a type of 285 * a variable or field. The first child of this element is the 286 * actual type. This may be a primitive type, an identifier, a 287 * dot which is the root of a fully qualified type, or an array of 288 * any of these. The second child may be type arguments to the type. 289 * 290 * @see #VARIABLE_DEF 291 * @see #METHOD_DEF 292 * @see #PARAMETER_DEF 293 * @see #IDENT 294 * @see #DOT 295 * @see #LITERAL_VOID 296 * @see #LITERAL_BOOLEAN 297 * @see #LITERAL_BYTE 298 * @see #LITERAL_CHAR 299 * @see #LITERAL_SHORT 300 * @see #LITERAL_INT 301 * @see #LITERAL_FLOAT 302 * @see #LITERAL_LONG 303 * @see #LITERAL_DOUBLE 304 * @see #ARRAY_DECLARATOR 305 * @see #TYPE_ARGUMENTS 306 **/ 307 public static final int TYPE = GeneratedJavaTokenTypes.TYPE; 308 /** 309 * A class declaration. 310 * 311 * <p>For example:</p> 312 * <pre> 313 * public class MyClass 314 * implements Serializable 315 * { 316 * } 317 * </pre> 318 * <p>parses as:</p> 319 * <pre> 320 * +--CLASS_DEF 321 * | 322 * +--MODIFIERS 323 * | 324 * +--LITERAL_PUBLIC (public) 325 * +--LITERAL_CLASS (class) 326 * +--IDENT (MyClass) 327 * +--EXTENDS_CLAUSE 328 * +--IMPLEMENTS_CLAUSE 329 * | 330 * +--IDENT (Serializable) 331 * +--OBJBLOCK 332 * | 333 * +--LCURLY ({) 334 * +--RCURLY (}) 335 * </pre> 336 * 337 * @see <a 338 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html">Java 339 * Language Specification, §8</a> 340 * @see #MODIFIERS 341 * @see #IDENT 342 * @see #EXTENDS_CLAUSE 343 * @see #IMPLEMENTS_CLAUSE 344 * @see #OBJBLOCK 345 * @see #LITERAL_NEW 346 **/ 347 public static final int CLASS_DEF = GeneratedJavaTokenTypes.CLASS_DEF; 348 /** 349 * An interface declaration. 350 * 351 * <p>For example:</p> 352 * 353 * <pre> 354 * public interface MyInterface 355 * { 356 * } 357 * 358 * </pre> 359 * 360 * <p>parses as:</p> 361 * 362 * <pre> 363 * +--INTERFACE_DEF 364 * | 365 * +--MODIFIERS 366 * | 367 * +--LITERAL_PUBLIC (public) 368 * +--LITERAL_INTERFACE (interface) 369 * +--IDENT (MyInterface) 370 * +--EXTENDS_CLAUSE 371 * +--OBJBLOCK 372 * | 373 * +--LCURLY ({) 374 * +--RCURLY (}) 375 * </pre> 376 * 377 * @see <a 378 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-9.html">Java 379 * Language Specification, §9</a> 380 * @see #MODIFIERS 381 * @see #IDENT 382 * @see #EXTENDS_CLAUSE 383 * @see #OBJBLOCK 384 **/ 385 public static final int INTERFACE_DEF = 386 GeneratedJavaTokenTypes.INTERFACE_DEF; 387 388 /** 389 * The package declaration. This is optional, but if it is 390 * included, then there is only one package declaration per source 391 * file and it must be the first non-comment in the file. A package 392 * declaration may be annotated in which case the annotations comes 393 * before the rest of the declaration (and are the first children). 394 * 395 * <p>For example:</p> 396 * 397 * <pre> 398 * package com.puppycrawl.tools.checkstyle.api; 399 * </pre> 400 * 401 * <p>parses as:</p> 402 * 403 * <pre> 404 * +--PACKAGE_DEF (package) 405 * | 406 * +--ANNOTATIONS 407 * +--DOT (.) 408 * | 409 * +--DOT (.) 410 * | 411 * +--DOT (.) 412 * | 413 * +--DOT (.) 414 * | 415 * +--IDENT (com) 416 * +--IDENT (puppycrawl) 417 * +--IDENT (tools) 418 * +--IDENT (checkstyle) 419 * +--IDENT (api) 420 * +--SEMI (;) 421 * </pre> 422 * 423 * @see <a 424 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-7.html#jls-7.4">Java 425 * Language Specification §7.4</a> 426 * @see #DOT 427 * @see #IDENT 428 * @see #SEMI 429 * @see #ANNOTATIONS 430 * @see FullIdent 431 **/ 432 public static final int PACKAGE_DEF = GeneratedJavaTokenTypes.PACKAGE_DEF; 433 /** 434 * An array declaration. 435 * 436 * <p>If the array declaration represents a type, then the type of 437 * the array elements is the first child. Multidimensional arrays 438 * may be regarded as arrays of arrays. In other words, the first 439 * child of the array declaration is another array 440 * declaration.</p> 441 * 442 * <p>For example:</p> 443 * <pre> 444 * int[] x; 445 * </pre> 446 * <p>parses as:</p> 447 * <pre> 448 * +--VARIABLE_DEF 449 * | 450 * +--MODIFIERS 451 * +--TYPE 452 * | 453 * +--ARRAY_DECLARATOR ([) 454 * | 455 * +--LITERAL_INT (int) 456 * +--IDENT (x) 457 * +--SEMI (;) 458 * </pre> 459 * 460 * <p>The array declaration may also represent an inline array 461 * definition. In this case, the first child will be either an 462 * expression specifying the length of the array or an array 463 * initialization block.</p> 464 * 465 * @see <a 466 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-10.html">Java 467 * Language Specification §10</a> 468 * @see #TYPE 469 * @see #ARRAY_INIT 470 **/ 471 public static final int ARRAY_DECLARATOR = 472 GeneratedJavaTokenTypes.ARRAY_DECLARATOR; 473 474 /** 475 * An extends clause. This appear as part of class and interface 476 * definitions. This element appears even if the 477 * {@code extends} keyword is not explicitly used. The child 478 * is an optional identifier. 479 * 480 * <p>For example:</p> 481 * 482 * <pre> 483 * extends java.util.LinkedList 484 * </pre> 485 * 486 * <p>parses as:</p> 487 * <pre> 488 * +--EXTENDS_CLAUSE 489 * | 490 * +--DOT (.) 491 * | 492 * +--DOT (.) 493 * | 494 * +--IDENT (java) 495 * +--IDENT (util) 496 * +--IDENT (LinkedList) 497 * </pre> 498 * 499 * @see #IDENT 500 * @see #DOT 501 * @see #CLASS_DEF 502 * @see #INTERFACE_DEF 503 * @see FullIdent 504 **/ 505 public static final int EXTENDS_CLAUSE = 506 GeneratedJavaTokenTypes.EXTENDS_CLAUSE; 507 508 /** 509 * An implements clause. This always appears in a class or enum 510 * declaration, even if there are no implemented interfaces. The 511 * children are a comma separated list of zero or more 512 * identifiers. 513 * 514 * <p>For example:</p> 515 * <pre> 516 * implements Serializable, Comparable 517 * </pre> 518 * <p>parses as:</p> 519 * <pre> 520 * +--IMPLEMENTS_CLAUSE 521 * | 522 * +--IDENT (Serializable) 523 * +--COMMA (,) 524 * +--IDENT (Comparable) 525 * </pre> 526 * 527 * @see #IDENT 528 * @see #DOT 529 * @see #COMMA 530 * @see #CLASS_DEF 531 * @see #ENUM_DEF 532 **/ 533 public static final int IMPLEMENTS_CLAUSE = 534 GeneratedJavaTokenTypes.IMPLEMENTS_CLAUSE; 535 536 /** 537 * A list of parameters to a method or constructor. The children 538 * are zero or more parameter declarations separated by commas. 539 * 540 * <p>For example</p> 541 * <pre> 542 * int start, int end 543 * </pre> 544 * <p>parses as:</p> 545 * <pre> 546 * +--PARAMETERS 547 * | 548 * +--PARAMETER_DEF 549 * | 550 * +--MODIFIERS 551 * +--TYPE 552 * | 553 * +--LITERAL_INT (int) 554 * +--IDENT (start) 555 * +--COMMA (,) 556 * +--PARAMETER_DEF 557 * | 558 * +--MODIFIERS 559 * +--TYPE 560 * | 561 * +--LITERAL_INT (int) 562 * +--IDENT (end) 563 * </pre> 564 * 565 * @see #PARAMETER_DEF 566 * @see #COMMA 567 * @see #METHOD_DEF 568 * @see #CTOR_DEF 569 **/ 570 public static final int PARAMETERS = GeneratedJavaTokenTypes.PARAMETERS; 571 /** 572 * A parameter declaration. The last parameter in a list of parameters may 573 * be variable length (indicated by the ELLIPSIS child node immediately 574 * after the TYPE child). 575 * 576 * @see #MODIFIERS 577 * @see #TYPE 578 * @see #IDENT 579 * @see #PARAMETERS 580 * @see #ELLIPSIS 581 **/ 582 public static final int PARAMETER_DEF = 583 GeneratedJavaTokenTypes.PARAMETER_DEF; 584 585 /** 586 * A labeled statement. 587 * 588 * <p>For example:</p> 589 * <pre> 590 * outside: ; 591 * </pre> 592 * <p>parses as:</p> 593 * <pre> 594 * +--LABELED_STAT (:) 595 * | 596 * +--IDENT (outside) 597 * +--EMPTY_STAT (;) 598 * </pre> 599 * 600 * @see <a 601 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.7">Java 602 * Language Specification, §14.7</a> 603 * @see #SLIST 604 **/ 605 public static final int LABELED_STAT = 606 GeneratedJavaTokenTypes.LABELED_STAT; 607 608 /** 609 * A type-cast. 610 * 611 * <p>For example:</p> 612 * <pre> 613 * (String)it.next() 614 * </pre> 615 * <p>parses as:</p> 616 * <pre> 617 * +--TYPECAST (() 618 * | 619 * +--TYPE 620 * | 621 * +--IDENT (String) 622 * +--RPAREN ()) 623 * +--METHOD_CALL (() 624 * | 625 * +--DOT (.) 626 * | 627 * +--IDENT (it) 628 * +--IDENT (next) 629 * +--ELIST 630 * +--RPAREN ()) 631 * </pre> 632 * @see <a 633 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.16">Java 634 * Language Specification, §15.16</a> 635 * @see #EXPR 636 * @see #TYPE 637 * @see #TYPE_ARGUMENTS 638 * @see #RPAREN 639 **/ 640 public static final int TYPECAST = GeneratedJavaTokenTypes.TYPECAST; 641 /** 642 * The array index operator. 643 * 644 * <p>For example:</p> 645 * <pre> 646 * ar[2] = 5; 647 * </pre> 648 * <p>parses as:</p> 649 * <pre> 650 * +--EXPR 651 * | 652 * +--ASSIGN (=) 653 * | 654 * +--INDEX_OP ([) 655 * | 656 * +--IDENT (ar) 657 * +--EXPR 658 * | 659 * +--NUM_INT (2) 660 * +--NUM_INT (5) 661 * +--SEMI (;) 662 * </pre> 663 * 664 * @see #EXPR 665 **/ 666 public static final int INDEX_OP = GeneratedJavaTokenTypes.INDEX_OP; 667 /** 668 * The {@code ++} (postfix increment) operator. 669 * 670 * @see <a 671 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.14.1">Java 672 * Language Specification, §15.14.1</a> 673 * @see #EXPR 674 * @see #INC 675 **/ 676 public static final int POST_INC = GeneratedJavaTokenTypes.POST_INC; 677 /** 678 * The {@code --} (postfix decrement) operator. 679 * 680 * @see <a 681 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.14.2">Java 682 * Language Specification, §15.14.2</a> 683 * @see #EXPR 684 * @see #DEC 685 **/ 686 public static final int POST_DEC = GeneratedJavaTokenTypes.POST_DEC; 687 /** 688 * A method call. A method call may have type arguments however these 689 * are attached to the appropriate node in the qualified method name. 690 * 691 * <p>For example:</p> 692 * <pre> 693 * Math.random() 694 * </pre> 695 * 696 * <p>parses as: 697 * <pre> 698 * +--METHOD_CALL (() 699 * | 700 * +--DOT (.) 701 * | 702 * +--IDENT (Math) 703 * +--IDENT (random) 704 * +--ELIST 705 * +--RPAREN ()) 706 * </pre> 707 * 708 * 709 * @see #IDENT 710 * @see #TYPE_ARGUMENTS 711 * @see #DOT 712 * @see #ELIST 713 * @see #RPAREN 714 * @see FullIdent 715 **/ 716 public static final int METHOD_CALL = GeneratedJavaTokenTypes.METHOD_CALL; 717 718 /** 719 * A reference to a method or constructor without arguments. Part of Java 8 syntax. 720 * The token should be used for subscribing for double colon literal. 721 * {@link #DOUBLE_COLON} token does not appear in the tree. 722 * 723 * <p>For example:</p> 724 * <pre> 725 * String::compareToIgnoreCase 726 * </pre> 727 * 728 * <p>parses as: 729 * <pre> 730 * +--METHOD_REF (::) 731 * | 732 * +--IDENT (String) 733 * +--IDENT (compareToIgnoreCase) 734 * </pre> 735 * 736 * @see #IDENT 737 * @see #DOUBLE_COLON 738 */ 739 public static final int METHOD_REF = GeneratedJavaTokenTypes.METHOD_REF; 740 /** 741 * An expression. Operators with lower precedence appear at a 742 * higher level in the tree than operators with higher precedence. 743 * Parentheses are siblings to the operator they enclose. 744 * 745 * <p>For example:</p> 746 * <pre> 747 * x = 4 + 3 * 5 + (30 + 26) / 4 + 5 % 4 + (1<<3); 748 * </pre> 749 * <p>parses as:</p> 750 * <pre> 751 * +--EXPR 752 * | 753 * +--ASSIGN (=) 754 * | 755 * +--IDENT (x) 756 * +--PLUS (+) 757 * | 758 * +--PLUS (+) 759 * | 760 * +--PLUS (+) 761 * | 762 * +--PLUS (+) 763 * | 764 * +--NUM_INT (4) 765 * +--STAR (*) 766 * | 767 * +--NUM_INT (3) 768 * +--NUM_INT (5) 769 * +--DIV (/) 770 * | 771 * +--LPAREN (() 772 * +--PLUS (+) 773 * | 774 * +--NUM_INT (30) 775 * +--NUM_INT (26) 776 * +--RPAREN ()) 777 * +--NUM_INT (4) 778 * +--MOD (%) 779 * | 780 * +--NUM_INT (5) 781 * +--NUM_INT (4) 782 * +--LPAREN (() 783 * +--SL (<<) 784 * | 785 * +--NUM_INT (1) 786 * +--NUM_INT (3) 787 * +--RPAREN ()) 788 * +--SEMI (;) 789 * </pre> 790 * 791 * @see #ELIST 792 * @see #ASSIGN 793 * @see #LPAREN 794 * @see #RPAREN 795 **/ 796 public static final int EXPR = GeneratedJavaTokenTypes.EXPR; 797 /** 798 * An array initialization. This may occur as part of an array 799 * declaration or inline with {@code new}. 800 * 801 * <p>For example:</p> 802 * <pre> 803 * int[] y = 804 * { 805 * 1, 806 * 2, 807 * }; 808 * </pre> 809 * <p>parses as:</p> 810 * <pre> 811 * +--VARIABLE_DEF 812 * | 813 * +--MODIFIERS 814 * +--TYPE 815 * | 816 * +--ARRAY_DECLARATOR ([) 817 * | 818 * +--LITERAL_INT (int) 819 * +--IDENT (y) 820 * +--ASSIGN (=) 821 * | 822 * +--ARRAY_INIT ({) 823 * | 824 * +--EXPR 825 * | 826 * +--NUM_INT (1) 827 * +--COMMA (,) 828 * +--EXPR 829 * | 830 * +--NUM_INT (2) 831 * +--COMMA (,) 832 * +--RCURLY (}) 833 * +--SEMI (;) 834 * </pre> 835 * 836 * <p>Also consider:</p> 837 * <pre> 838 * int[] z = new int[] 839 * { 840 * 1, 841 * 2, 842 * }; 843 * </pre> 844 * <p>which parses as:</p> 845 * <pre> 846 * +--VARIABLE_DEF 847 * | 848 * +--MODIFIERS 849 * +--TYPE 850 * | 851 * +--ARRAY_DECLARATOR ([) 852 * | 853 * +--LITERAL_INT (int) 854 * +--IDENT (z) 855 * +--ASSIGN (=) 856 * | 857 * +--EXPR 858 * | 859 * +--LITERAL_NEW (new) 860 * | 861 * +--LITERAL_INT (int) 862 * +--ARRAY_DECLARATOR ([) 863 * +--ARRAY_INIT ({) 864 * | 865 * +--EXPR 866 * | 867 * +--NUM_INT (1) 868 * +--COMMA (,) 869 * +--EXPR 870 * | 871 * +--NUM_INT (2) 872 * +--COMMA (,) 873 * +--RCURLY (}) 874 * </pre> 875 * 876 * @see #ARRAY_DECLARATOR 877 * @see #TYPE 878 * @see #LITERAL_NEW 879 * @see #COMMA 880 **/ 881 public static final int ARRAY_INIT = GeneratedJavaTokenTypes.ARRAY_INIT; 882 /** 883 * An import declaration. Import declarations are option, but 884 * must appear after the package declaration and before the first type 885 * declaration. 886 * 887 * <p>For example:</p> 888 * 889 * <pre> 890 * import java.io.IOException; 891 * </pre> 892 * 893 * <p>parses as:</p> 894 * 895 * <pre> 896 * +--IMPORT (import) 897 * | 898 * +--DOT (.) 899 * | 900 * +--DOT (.) 901 * | 902 * +--IDENT (java) 903 * +--IDENT (io) 904 * +--IDENT (IOException) 905 * +--SEMI (;) 906 * </pre> 907 * 908 * @see <a 909 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-7.html#jls-7.5">Java 910 * Language Specification §7.5</a> 911 * @see #DOT 912 * @see #IDENT 913 * @see #STAR 914 * @see #SEMI 915 * @see FullIdent 916 **/ 917 public static final int IMPORT = GeneratedJavaTokenTypes.IMPORT; 918 /** 919 * The {@code -} (unary minus) operator. 920 * 921 * @see <a 922 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.15.4">Java 923 * Language Specification, §15.15.4</a> 924 * @see #EXPR 925 **/ 926 public static final int UNARY_MINUS = GeneratedJavaTokenTypes.UNARY_MINUS; 927 /** 928 * The {@code +} (unary plus) operator. 929 * 930 * @see <a 931 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.15.3">Java 932 * Language Specification, §15.15.3</a> 933 * @see #EXPR 934 **/ 935 public static final int UNARY_PLUS = GeneratedJavaTokenTypes.UNARY_PLUS; 936 /** 937 * A group of case clauses. Case clauses with no associated 938 * statements are grouped together into a case group. The last 939 * child is a statement list containing the statements to execute 940 * upon a match. 941 * 942 * <p>For example:</p> 943 * <pre> 944 * case 0: 945 * case 1: 946 * case 2: 947 * x = 3; 948 * break; 949 * </pre> 950 * <p>parses as:</p> 951 * <pre> 952 * +--CASE_GROUP 953 * | 954 * +--LITERAL_CASE (case) 955 * | 956 * +--EXPR 957 * | 958 * +--NUM_INT (0) 959 * +--LITERAL_CASE (case) 960 * | 961 * +--EXPR 962 * | 963 * +--NUM_INT (1) 964 * +--LITERAL_CASE (case) 965 * | 966 * +--EXPR 967 * | 968 * +--NUM_INT (2) 969 * +--SLIST 970 * | 971 * +--EXPR 972 * | 973 * +--ASSIGN (=) 974 * | 975 * +--IDENT (x) 976 * +--NUM_INT (3) 977 * +--SEMI (;) 978 * +--LITERAL_BREAK (break) 979 * | 980 * +--SEMI (;) 981 * </pre> 982 * 983 * @see #LITERAL_CASE 984 * @see #LITERAL_DEFAULT 985 * @see #LITERAL_SWITCH 986 **/ 987 public static final int CASE_GROUP = GeneratedJavaTokenTypes.CASE_GROUP; 988 /** 989 * An expression list. The children are a comma separated list of 990 * expressions. 991 * 992 * @see #LITERAL_NEW 993 * @see #FOR_INIT 994 * @see #FOR_ITERATOR 995 * @see #EXPR 996 * @see #METHOD_CALL 997 * @see #CTOR_CALL 998 * @see #SUPER_CTOR_CALL 999 **/ 1000 public static final int ELIST = GeneratedJavaTokenTypes.ELIST; 1001 /** 1002 * A for loop initializer. This is a child of 1003 * {@code LITERAL_FOR}. The children of this element may be 1004 * a comma separated list of variable declarations, an expression 1005 * list, or empty. 1006 * 1007 * @see #VARIABLE_DEF 1008 * @see #ELIST 1009 * @see #LITERAL_FOR 1010 **/ 1011 public static final int FOR_INIT = GeneratedJavaTokenTypes.FOR_INIT; 1012 /** 1013 * A for loop condition. This is a child of 1014 * {@code LITERAL_FOR}. The child of this element is an 1015 * optional expression. 1016 * 1017 * @see #EXPR 1018 * @see #LITERAL_FOR 1019 **/ 1020 public static final int FOR_CONDITION = 1021 GeneratedJavaTokenTypes.FOR_CONDITION; 1022 1023 /** 1024 * A for loop iterator. This is a child of 1025 * {@code LITERAL_FOR}. The child of this element is an 1026 * optional expression list. 1027 * 1028 * @see #ELIST 1029 * @see #LITERAL_FOR 1030 **/ 1031 public static final int FOR_ITERATOR = 1032 GeneratedJavaTokenTypes.FOR_ITERATOR; 1033 1034 /** 1035 * The empty statement. This goes in place of an 1036 * {@code SLIST} for a {@code for} or {@code while} 1037 * loop body. 1038 * 1039 * @see <a 1040 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.6">Java 1041 * Language Specification, §14.6</a> 1042 * @see #LITERAL_FOR 1043 * @see #LITERAL_WHILE 1044 **/ 1045 public static final int EMPTY_STAT = GeneratedJavaTokenTypes.EMPTY_STAT; 1046 /** 1047 * The {@code final} keyword. 1048 * 1049 * @see #MODIFIERS 1050 **/ 1051 public static final int FINAL = GeneratedJavaTokenTypes.FINAL; 1052 /** 1053 * The {@code abstract} keyword. 1054 * 1055 * @see #MODIFIERS 1056 **/ 1057 public static final int ABSTRACT = GeneratedJavaTokenTypes.ABSTRACT; 1058 /** 1059 * The {@code strictfp} keyword. 1060 * 1061 * @see #MODIFIERS 1062 **/ 1063 public static final int STRICTFP = GeneratedJavaTokenTypes.STRICTFP; 1064 /** 1065 * A super constructor call. 1066 * 1067 * @see #ELIST 1068 * @see #RPAREN 1069 * @see #SEMI 1070 * @see #CTOR_CALL 1071 **/ 1072 public static final int SUPER_CTOR_CALL = 1073 GeneratedJavaTokenTypes.SUPER_CTOR_CALL; 1074 1075 /** 1076 * A constructor call. 1077 * 1078 * <p>For example:</p> 1079 * <pre> 1080 * this(1); 1081 * </pre> 1082 * <p>parses as:</p> 1083 * <pre> 1084 * +--CTOR_CALL (this) 1085 * | 1086 * +--LPAREN (() 1087 * +--ELIST 1088 * | 1089 * +--EXPR 1090 * | 1091 * +--NUM_INT (1) 1092 * +--RPAREN ()) 1093 * +--SEMI (;) 1094 * </pre> 1095 * 1096 * @see #ELIST 1097 * @see #RPAREN 1098 * @see #SEMI 1099 * @see #SUPER_CTOR_CALL 1100 **/ 1101 public static final int CTOR_CALL = GeneratedJavaTokenTypes.CTOR_CALL; 1102 1103 /** 1104 * The statement terminator ({@code ;}). Depending on the 1105 * context, this make occur as a sibling, a child, or not at all. 1106 * 1107 * @see #PACKAGE_DEF 1108 * @see #IMPORT 1109 * @see #SLIST 1110 * @see #ARRAY_INIT 1111 * @see #LITERAL_FOR 1112 **/ 1113 public static final int SEMI = GeneratedJavaTokenTypes.SEMI; 1114 1115 /** 1116 * The {@code ]} symbol. 1117 * 1118 * @see #INDEX_OP 1119 * @see #ARRAY_DECLARATOR 1120 **/ 1121 public static final int RBRACK = GeneratedJavaTokenTypes.RBRACK; 1122 /** 1123 * The {@code void} keyword. 1124 * 1125 * @see #TYPE 1126 **/ 1127 public static final int LITERAL_VOID = 1128 GeneratedJavaTokenTypes.LITERAL_void; 1129 1130 /** 1131 * The {@code boolean} keyword. 1132 * 1133 * @see #TYPE 1134 **/ 1135 public static final int LITERAL_BOOLEAN = 1136 GeneratedJavaTokenTypes.LITERAL_boolean; 1137 1138 /** 1139 * The {@code byte} keyword. 1140 * 1141 * @see #TYPE 1142 **/ 1143 public static final int LITERAL_BYTE = 1144 GeneratedJavaTokenTypes.LITERAL_byte; 1145 1146 /** 1147 * The {@code char} keyword. 1148 * 1149 * @see #TYPE 1150 **/ 1151 public static final int LITERAL_CHAR = 1152 GeneratedJavaTokenTypes.LITERAL_char; 1153 1154 /** 1155 * The {@code short} keyword. 1156 * 1157 * @see #TYPE 1158 **/ 1159 public static final int LITERAL_SHORT = 1160 GeneratedJavaTokenTypes.LITERAL_short; 1161 1162 /** 1163 * The {@code int} keyword. 1164 * 1165 * @see #TYPE 1166 **/ 1167 public static final int LITERAL_INT = GeneratedJavaTokenTypes.LITERAL_int; 1168 /** 1169 * The {@code float} keyword. 1170 * 1171 * @see #TYPE 1172 **/ 1173 public static final int LITERAL_FLOAT = 1174 GeneratedJavaTokenTypes.LITERAL_float; 1175 1176 /** 1177 * The {@code long} keyword. 1178 * 1179 * @see #TYPE 1180 **/ 1181 public static final int LITERAL_LONG = 1182 GeneratedJavaTokenTypes.LITERAL_long; 1183 1184 /** 1185 * The {@code double} keyword. 1186 * 1187 * @see #TYPE 1188 **/ 1189 public static final int LITERAL_DOUBLE = 1190 GeneratedJavaTokenTypes.LITERAL_double; 1191 1192 /** 1193 * An identifier. These can be names of types, subpackages, 1194 * fields, methods, parameters, and local variables. 1195 **/ 1196 public static final int IDENT = GeneratedJavaTokenTypes.IDENT; 1197 /** 1198 * The <code>.</code> (dot) operator. 1199 * 1200 * @see FullIdent 1201 * @noinspection HtmlTagCanBeJavadocTag 1202 **/ 1203 public static final int DOT = GeneratedJavaTokenTypes.DOT; 1204 /** 1205 * The {@code *} (multiplication or wildcard) operator. 1206 * 1207 * @see <a 1208 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-7.html#jls-7.5.2">Java 1209 * Language Specification, §7.5.2</a> 1210 * @see <a 1211 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.17.1">Java 1212 * Language Specification, §15.17.1</a> 1213 * @see #EXPR 1214 * @see #IMPORT 1215 **/ 1216 public static final int STAR = GeneratedJavaTokenTypes.STAR; 1217 /** 1218 * The {@code private} keyword. 1219 * 1220 * @see #MODIFIERS 1221 **/ 1222 public static final int LITERAL_PRIVATE = 1223 GeneratedJavaTokenTypes.LITERAL_private; 1224 1225 /** 1226 * The {@code public} keyword. 1227 * 1228 * @see #MODIFIERS 1229 **/ 1230 public static final int LITERAL_PUBLIC = 1231 GeneratedJavaTokenTypes.LITERAL_public; 1232 1233 /** 1234 * The {@code protected} keyword. 1235 * 1236 * @see #MODIFIERS 1237 **/ 1238 public static final int LITERAL_PROTECTED = 1239 GeneratedJavaTokenTypes.LITERAL_protected; 1240 1241 /** 1242 * The {@code static} keyword. 1243 * 1244 * @see #MODIFIERS 1245 **/ 1246 public static final int LITERAL_STATIC = 1247 GeneratedJavaTokenTypes.LITERAL_static; 1248 1249 /** 1250 * The {@code transient} keyword. 1251 * 1252 * @see #MODIFIERS 1253 **/ 1254 public static final int LITERAL_TRANSIENT = 1255 GeneratedJavaTokenTypes.LITERAL_transient; 1256 1257 /** 1258 * The {@code native} keyword. 1259 * 1260 * @see #MODIFIERS 1261 **/ 1262 public static final int LITERAL_NATIVE = 1263 GeneratedJavaTokenTypes.LITERAL_native; 1264 1265 /** 1266 * The {@code synchronized} keyword. This may be used as a 1267 * modifier of a method or in the definition of a synchronized 1268 * block. 1269 * 1270 * <p>For example:</p> 1271 * 1272 * <pre> 1273 * synchronized(this) 1274 * { 1275 * x++; 1276 * } 1277 * </pre> 1278 * 1279 * <p>parses as:</p> 1280 * 1281 * <pre> 1282 * +--LITERAL_SYNCHRONIZED (synchronized) 1283 * | 1284 * +--LPAREN (() 1285 * +--EXPR 1286 * | 1287 * +--LITERAL_THIS (this) 1288 * +--RPAREN ()) 1289 * +--SLIST ({) 1290 * | 1291 * +--EXPR 1292 * | 1293 * +--POST_INC (++) 1294 * | 1295 * +--IDENT (x) 1296 * +--SEMI (;) 1297 * +--RCURLY (}) 1298 * +--RCURLY (}) 1299 * </pre> 1300 * 1301 * @see #MODIFIERS 1302 * @see #LPAREN 1303 * @see #EXPR 1304 * @see #RPAREN 1305 * @see #SLIST 1306 * @see #RCURLY 1307 **/ 1308 public static final int LITERAL_SYNCHRONIZED = 1309 GeneratedJavaTokenTypes.LITERAL_synchronized; 1310 1311 /** 1312 * The {@code volatile} keyword. 1313 * 1314 * @see #MODIFIERS 1315 **/ 1316 public static final int LITERAL_VOLATILE = 1317 GeneratedJavaTokenTypes.LITERAL_volatile; 1318 1319 /** 1320 * The {@code class} keyword. This element appears both 1321 * as part of a class declaration, and inline to reference a 1322 * class object. 1323 * 1324 * <p>For example:</p> 1325 * 1326 * <pre> 1327 * int.class 1328 * </pre> 1329 * <p>parses as:</p> 1330 * <pre> 1331 * +--EXPR 1332 * | 1333 * +--DOT (.) 1334 * | 1335 * +--LITERAL_INT (int) 1336 * +--LITERAL_CLASS (class) 1337 * </pre> 1338 * 1339 * @see #DOT 1340 * @see #IDENT 1341 * @see #CLASS_DEF 1342 * @see FullIdent 1343 **/ 1344 public static final int LITERAL_CLASS = 1345 GeneratedJavaTokenTypes.LITERAL_class; 1346 1347 /** 1348 * The {@code interface} keyword. This token appears in 1349 * interface definition. 1350 * 1351 * @see #INTERFACE_DEF 1352 **/ 1353 public static final int LITERAL_INTERFACE = 1354 GeneratedJavaTokenTypes.LITERAL_interface; 1355 1356 /** 1357 * A left curly brace (<code>{</code>). 1358 * 1359 * @see #OBJBLOCK 1360 * @see #ARRAY_INIT 1361 * @see #SLIST 1362 **/ 1363 public static final int LCURLY = GeneratedJavaTokenTypes.LCURLY; 1364 /** 1365 * A right curly brace (<code>}</code>). 1366 * 1367 * @see #OBJBLOCK 1368 * @see #ARRAY_INIT 1369 * @see #SLIST 1370 **/ 1371 public static final int RCURLY = GeneratedJavaTokenTypes.RCURLY; 1372 /** 1373 * The {@code ,} (comma) operator. 1374 * 1375 * @see #ARRAY_INIT 1376 * @see #FOR_INIT 1377 * @see #FOR_ITERATOR 1378 * @see #LITERAL_THROWS 1379 * @see #IMPLEMENTS_CLAUSE 1380 **/ 1381 public static final int COMMA = GeneratedJavaTokenTypes.COMMA; 1382 1383 /** 1384 * A left parenthesis ({@code (}). 1385 * 1386 * @see #LITERAL_FOR 1387 * @see #LITERAL_NEW 1388 * @see #EXPR 1389 * @see #LITERAL_SWITCH 1390 * @see #LITERAL_CATCH 1391 **/ 1392 public static final int LPAREN = GeneratedJavaTokenTypes.LPAREN; 1393 /** 1394 * A right parenthesis ({@code )}). 1395 * 1396 * @see #LITERAL_FOR 1397 * @see #LITERAL_NEW 1398 * @see #METHOD_CALL 1399 * @see #TYPECAST 1400 * @see #EXPR 1401 * @see #LITERAL_SWITCH 1402 * @see #LITERAL_CATCH 1403 **/ 1404 public static final int RPAREN = GeneratedJavaTokenTypes.RPAREN; 1405 /** 1406 * The {@code this} keyword. 1407 * 1408 * @see #EXPR 1409 * @see #CTOR_CALL 1410 **/ 1411 public static final int LITERAL_THIS = 1412 GeneratedJavaTokenTypes.LITERAL_this; 1413 1414 /** 1415 * The {@code super} keyword. 1416 * 1417 * @see #EXPR 1418 * @see #SUPER_CTOR_CALL 1419 **/ 1420 public static final int LITERAL_SUPER = 1421 GeneratedJavaTokenTypes.LITERAL_super; 1422 1423 /** 1424 * The {@code =} (assignment) operator. 1425 * 1426 * @see <a 1427 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.1">Java 1428 * Language Specification, §15.26.1</a> 1429 * @see #EXPR 1430 **/ 1431 public static final int ASSIGN = GeneratedJavaTokenTypes.ASSIGN; 1432 /** 1433 * The {@code throws} keyword. The children are a number of 1434 * one or more identifiers separated by commas. 1435 * 1436 * @see <a 1437 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.4.4">Java 1438 * Language Specification, §8.4.4</a> 1439 * @see #IDENT 1440 * @see #DOT 1441 * @see #COMMA 1442 * @see #METHOD_DEF 1443 * @see #CTOR_DEF 1444 * @see FullIdent 1445 **/ 1446 public static final int LITERAL_THROWS = 1447 GeneratedJavaTokenTypes.LITERAL_throws; 1448 1449 /** 1450 * The {@code :} (colon) operator. This will appear as part 1451 * of the conditional operator ({@code ? :}). 1452 * 1453 * @see #QUESTION 1454 * @see #LABELED_STAT 1455 * @see #CASE_GROUP 1456 **/ 1457 public static final int COLON = GeneratedJavaTokenTypes.COLON; 1458 1459 /** 1460 * The {@code ::} (double colon) separator. 1461 * It is part of Java 8 syntax that is used for method reference. 1462 * The token does not appear in tree, {@link #METHOD_REF} should be used instead. 1463 * 1464 * @see #METHOD_REF 1465 */ 1466 public static final int DOUBLE_COLON = GeneratedJavaTokenTypes.DOUBLE_COLON; 1467 /** 1468 * The {@code if} keyword. 1469 * 1470 * <p>For example:</p> 1471 * <pre> 1472 * if(optimistic) 1473 * { 1474 * message = "half full"; 1475 * } 1476 * else 1477 * { 1478 * message = "half empty"; 1479 * } 1480 * </pre> 1481 * <p>parses as:</p> 1482 * <pre> 1483 * +--LITERAL_IF (if) 1484 * | 1485 * +--LPAREN (() 1486 * +--EXPR 1487 * | 1488 * +--IDENT (optimistic) 1489 * +--RPAREN ()) 1490 * +--SLIST ({) 1491 * | 1492 * +--EXPR 1493 * | 1494 * +--ASSIGN (=) 1495 * | 1496 * +--IDENT (message) 1497 * +--STRING_LITERAL ("half full") 1498 * +--SEMI (;) 1499 * +--RCURLY (}) 1500 * +--LITERAL_ELSE (else) 1501 * | 1502 * +--SLIST ({) 1503 * | 1504 * +--EXPR 1505 * | 1506 * +--ASSIGN (=) 1507 * | 1508 * +--IDENT (message) 1509 * +--STRING_LITERAL ("half empty") 1510 * +--SEMI (;) 1511 * +--RCURLY (}) 1512 * </pre> 1513 * 1514 * @see #LPAREN 1515 * @see #EXPR 1516 * @see #RPAREN 1517 * @see #SLIST 1518 * @see #EMPTY_STAT 1519 * @see #LITERAL_ELSE 1520 **/ 1521 public static final int LITERAL_IF = GeneratedJavaTokenTypes.LITERAL_if; 1522 /** 1523 * The {@code for} keyword. The children are {@code (}, 1524 * an initializer, a condition, an iterator, a {@code )} and 1525 * either a statement list, a single expression, or an empty 1526 * statement. 1527 * 1528 * <p>For example:</p> 1529 * <pre> 1530 * for(int i = 0, n = myArray.length; i < n; i++) 1531 * { 1532 * } 1533 * </pre> 1534 * 1535 * <p>parses as:</p> 1536 * <pre> 1537 * +--LITERAL_FOR (for) 1538 * | 1539 * +--LPAREN (() 1540 * +--FOR_INIT 1541 * | 1542 * +--VARIABLE_DEF 1543 * | 1544 * +--MODIFIERS 1545 * +--TYPE 1546 * | 1547 * +--LITERAL_INT (int) 1548 * +--IDENT (i) 1549 * +--ASSIGN (=) 1550 * | 1551 * +--EXPR 1552 * | 1553 * +--NUM_INT (0) 1554 * +--COMMA (,) 1555 * +--VARIABLE_DEF 1556 * | 1557 * +--MODIFIERS 1558 * +--TYPE 1559 * | 1560 * +--LITERAL_INT (int) 1561 * +--IDENT (n) 1562 * +--ASSIGN (=) 1563 * | 1564 * +--EXPR 1565 * | 1566 * +--DOT (.) 1567 * | 1568 * +--IDENT (myArray) 1569 * +--IDENT (length) 1570 * +--SEMI (;) 1571 * +--FOR_CONDITION 1572 * | 1573 * +--EXPR 1574 * | 1575 * +--LT (<) 1576 * | 1577 * +--IDENT (i) 1578 * +--IDENT (n) 1579 * +--SEMI (;) 1580 * +--FOR_ITERATOR 1581 * | 1582 * +--ELIST 1583 * | 1584 * +--EXPR 1585 * | 1586 * +--POST_INC (++) 1587 * | 1588 * +--IDENT (i) 1589 * +--RPAREN ()) 1590 * +--SLIST ({) 1591 * | 1592 * +--RCURLY (}) 1593 * </pre> 1594 * 1595 * @see #LPAREN 1596 * @see #FOR_INIT 1597 * @see #SEMI 1598 * @see #FOR_CONDITION 1599 * @see #FOR_ITERATOR 1600 * @see #RPAREN 1601 * @see #SLIST 1602 * @see #EMPTY_STAT 1603 * @see #EXPR 1604 **/ 1605 public static final int LITERAL_FOR = GeneratedJavaTokenTypes.LITERAL_for; 1606 /** 1607 * The {@code while} keyword. 1608 * 1609 * <p>For example:</p> 1610 * <pre> 1611 * while(line != null) 1612 * { 1613 * process(line); 1614 * line = in.readLine(); 1615 * } 1616 * </pre> 1617 * <p>parses as:</p> 1618 * <pre> 1619 * +--LITERAL_WHILE (while) 1620 * | 1621 * +--LPAREN (() 1622 * +--EXPR 1623 * | 1624 * +--NOT_EQUAL (!=) 1625 * | 1626 * +--IDENT (line) 1627 * +--LITERAL_NULL (null) 1628 * +--RPAREN ()) 1629 * +--SLIST ({) 1630 * | 1631 * +--EXPR 1632 * | 1633 * +--METHOD_CALL (() 1634 * | 1635 * +--IDENT (process) 1636 * +--ELIST 1637 * | 1638 * +--EXPR 1639 * | 1640 * +--IDENT (line) 1641 * +--RPAREN ()) 1642 * +--SEMI (;) 1643 * +--EXPR 1644 * | 1645 * +--ASSIGN (=) 1646 * | 1647 * +--IDENT (line) 1648 * +--METHOD_CALL (() 1649 * | 1650 * +--DOT (.) 1651 * | 1652 * +--IDENT (in) 1653 * +--IDENT (readLine) 1654 * +--ELIST 1655 * +--RPAREN ()) 1656 * +--SEMI (;) 1657 * +--RCURLY (}) 1658 * </pre> 1659 **/ 1660 public static final int LITERAL_WHILE = 1661 GeneratedJavaTokenTypes.LITERAL_while; 1662 1663 /** 1664 * The {@code do} keyword. Note the the while token does not 1665 * appear as part of the do-while construct. 1666 * 1667 * <p>For example:</p> 1668 * <pre> 1669 * do 1670 * { 1671 * x = rand.nextInt(10); 1672 * } 1673 * while(x < 5); 1674 * </pre> 1675 * <p>parses as:</p> 1676 * <pre> 1677 * +--LITERAL_DO (do) 1678 * | 1679 * +--SLIST ({) 1680 * | 1681 * +--EXPR 1682 * | 1683 * +--ASSIGN (=) 1684 * | 1685 * +--IDENT (x) 1686 * +--METHOD_CALL (() 1687 * | 1688 * +--DOT (.) 1689 * | 1690 * +--IDENT (rand) 1691 * +--IDENT (nextInt) 1692 * +--ELIST 1693 * | 1694 * +--EXPR 1695 * | 1696 * +--NUM_INT (10) 1697 * +--RPAREN ()) 1698 * +--SEMI (;) 1699 * +--RCURLY (}) 1700 * +--DO_WHILE (while) 1701 * +--LPAREN (() 1702 * +--EXPR 1703 * | 1704 * +--LT (<) 1705 * | 1706 * +--IDENT (x) 1707 * +--NUM_INT (5) 1708 * +--RPAREN ()) 1709 * +--SEMI (;) 1710 * </pre> 1711 * 1712 * @see #SLIST 1713 * @see #EXPR 1714 * @see #EMPTY_STAT 1715 * @see #LPAREN 1716 * @see #RPAREN 1717 * @see #SEMI 1718 **/ 1719 public static final int LITERAL_DO = GeneratedJavaTokenTypes.LITERAL_do; 1720 /** 1721 * Literal {@code while} in do-while loop. 1722 * @see #LITERAL_DO 1723 */ 1724 public static final int DO_WHILE = GeneratedJavaTokenTypes.DO_WHILE; 1725 /** 1726 * The {@code break} keyword. The first child is an optional 1727 * identifier and the last child is a semicolon. 1728 * 1729 * @see #IDENT 1730 * @see #SEMI 1731 * @see #SLIST 1732 **/ 1733 public static final int LITERAL_BREAK = 1734 GeneratedJavaTokenTypes.LITERAL_break; 1735 1736 /** 1737 * The {@code continue} keyword. The first child is an 1738 * optional identifier and the last child is a semicolon. 1739 * 1740 * @see #IDENT 1741 * @see #SEMI 1742 * @see #SLIST 1743 **/ 1744 public static final int LITERAL_CONTINUE = 1745 GeneratedJavaTokenTypes.LITERAL_continue; 1746 1747 /** 1748 * The {@code return} keyword. The first child is an 1749 * optional expression for the return value. The last child is a 1750 * semi colon. 1751 * 1752 * @see #EXPR 1753 * @see #SEMI 1754 * @see #SLIST 1755 **/ 1756 public static final int LITERAL_RETURN = 1757 GeneratedJavaTokenTypes.LITERAL_return; 1758 1759 /** 1760 * The {@code switch} keyword. 1761 * 1762 * <p>For example:</p> 1763 * <pre> 1764 * switch(type) 1765 * { 1766 * case 0: 1767 * background = Color.blue; 1768 * break; 1769 * case 1: 1770 * background = Color.red; 1771 * break; 1772 * default: 1773 * background = Color.green; 1774 * break; 1775 * } 1776 * </pre> 1777 * <p>parses as:</p> 1778 * <pre> 1779 * +--LITERAL_SWITCH (switch) 1780 * | 1781 * +--LPAREN (() 1782 * +--EXPR 1783 * | 1784 * +--IDENT (type) 1785 * +--RPAREN ()) 1786 * +--LCURLY ({) 1787 * +--CASE_GROUP 1788 * | 1789 * +--LITERAL_CASE (case) 1790 * | 1791 * +--EXPR 1792 * | 1793 * +--NUM_INT (0) 1794 * +--SLIST 1795 * | 1796 * +--EXPR 1797 * | 1798 * +--ASSIGN (=) 1799 * | 1800 * +--IDENT (background) 1801 * +--DOT (.) 1802 * | 1803 * +--IDENT (Color) 1804 * +--IDENT (blue) 1805 * +--SEMI (;) 1806 * +--LITERAL_BREAK (break) 1807 * | 1808 * +--SEMI (;) 1809 * +--CASE_GROUP 1810 * | 1811 * +--LITERAL_CASE (case) 1812 * | 1813 * +--EXPR 1814 * | 1815 * +--NUM_INT (1) 1816 * +--SLIST 1817 * | 1818 * +--EXPR 1819 * | 1820 * +--ASSIGN (=) 1821 * | 1822 * +--IDENT (background) 1823 * +--DOT (.) 1824 * | 1825 * +--IDENT (Color) 1826 * +--IDENT (red) 1827 * +--SEMI (;) 1828 * +--LITERAL_BREAK (break) 1829 * | 1830 * +--SEMI (;) 1831 * +--CASE_GROUP 1832 * | 1833 * +--LITERAL_DEFAULT (default) 1834 * +--SLIST 1835 * | 1836 * +--EXPR 1837 * | 1838 * +--ASSIGN (=) 1839 * | 1840 * +--IDENT (background) 1841 * +--DOT (.) 1842 * | 1843 * +--IDENT (Color) 1844 * +--IDENT (green) 1845 * +--SEMI (;) 1846 * +--LITERAL_BREAK (break) 1847 * | 1848 * +--SEMI (;) 1849 * +--RCURLY (}) 1850 * </pre> 1851 * 1852 * @see <a 1853 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.10">Java 1854 * Language Specification, §14.10</a> 1855 * @see #LPAREN 1856 * @see #EXPR 1857 * @see #RPAREN 1858 * @see #LCURLY 1859 * @see #CASE_GROUP 1860 * @see #RCURLY 1861 * @see #SLIST 1862 **/ 1863 public static final int LITERAL_SWITCH = 1864 GeneratedJavaTokenTypes.LITERAL_switch; 1865 1866 /** 1867 * The {@code throw} keyword. The first child is an 1868 * expression that evaluates to a {@code Throwable} instance. 1869 * 1870 * @see <a 1871 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.17">Java 1872 * Language Specification, §14.17</a> 1873 * @see #SLIST 1874 * @see #EXPR 1875 **/ 1876 public static final int LITERAL_THROW = 1877 GeneratedJavaTokenTypes.LITERAL_throw; 1878 1879 /** 1880 * The {@code else} keyword. This appears as a child of an 1881 * {@code if} statement. 1882 * 1883 * @see #SLIST 1884 * @see #EXPR 1885 * @see #EMPTY_STAT 1886 * @see #LITERAL_IF 1887 **/ 1888 public static final int LITERAL_ELSE = 1889 GeneratedJavaTokenTypes.LITERAL_else; 1890 1891 /** 1892 * The {@code case} keyword. The first child is a constant 1893 * expression that evaluates to an integer. 1894 * 1895 * @see #CASE_GROUP 1896 * @see #EXPR 1897 **/ 1898 public static final int LITERAL_CASE = 1899 GeneratedJavaTokenTypes.LITERAL_case; 1900 1901 /** 1902 * The {@code default} keyword. This element has no 1903 * children. 1904 * 1905 * @see #CASE_GROUP 1906 * @see #MODIFIERS 1907 **/ 1908 public static final int LITERAL_DEFAULT = 1909 GeneratedJavaTokenTypes.LITERAL_default; 1910 1911 /** 1912 * The {@code try} keyword. The children are a statement 1913 * list, zero or more catch blocks and then an optional finally 1914 * block. 1915 * 1916 * <p>For example:</p> 1917 * <pre> 1918 * try 1919 * { 1920 * FileReader in = new FileReader("abc.txt"); 1921 * } 1922 * catch(IOException ioe) 1923 * { 1924 * } 1925 * finally 1926 * { 1927 * } 1928 * </pre> 1929 * <p>parses as:</p> 1930 * <pre> 1931 * +--LITERAL_TRY (try) 1932 * | 1933 * +--SLIST ({) 1934 * | 1935 * +--VARIABLE_DEF 1936 * | 1937 * +--MODIFIERS 1938 * +--TYPE 1939 * | 1940 * +--IDENT (FileReader) 1941 * +--IDENT (in) 1942 * +--ASSIGN (=) 1943 * | 1944 * +--EXPR 1945 * | 1946 * +--LITERAL_NEW (new) 1947 * | 1948 * +--IDENT (FileReader) 1949 * +--LPAREN (() 1950 * +--ELIST 1951 * | 1952 * +--EXPR 1953 * | 1954 * +--STRING_LITERAL ("abc.txt") 1955 * +--RPAREN ()) 1956 * +--SEMI (;) 1957 * +--RCURLY (}) 1958 * +--LITERAL_CATCH (catch) 1959 * | 1960 * +--LPAREN (() 1961 * +--PARAMETER_DEF 1962 * | 1963 * +--MODIFIERS 1964 * +--TYPE 1965 * | 1966 * +--IDENT (IOException) 1967 * +--IDENT (ioe) 1968 * +--RPAREN ()) 1969 * +--SLIST ({) 1970 * | 1971 * +--RCURLY (}) 1972 * +--LITERAL_FINALLY (finally) 1973 * | 1974 * +--SLIST ({) 1975 * | 1976 * +--RCURLY (}) 1977 * +--RCURLY (}) 1978 * </pre> 1979 * 1980 * @see <a 1981 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.19">Java 1982 * Language Specification, §14.19</a> 1983 * @see #SLIST 1984 * @see #LITERAL_CATCH 1985 * @see #LITERAL_FINALLY 1986 **/ 1987 public static final int LITERAL_TRY = GeneratedJavaTokenTypes.LITERAL_try; 1988 1989 /** 1990 * The Java 7 try-with-resources construct. 1991 * 1992 * <p>For example:</p> 1993 * <pre> 1994 * try (Foo foo = new Foo(); Bar bar = new Bar()) { } 1995 * </pre> 1996 * <p>parses as:</p> 1997 * <pre> 1998 * +--LITERAL_TRY (try) 1999 * | 2000 * +--RESOURCE_SPECIFICATION 2001 * | 2002 * +--LPAREN (() 2003 * +--RESOURCES 2004 * | 2005 * +--RESOURCE 2006 * | 2007 * +--MODIFIERS 2008 * +--TYPE 2009 * | 2010 * +--IDENT (Foo) 2011 * +--IDENT (foo) 2012 * +--ASSIGN (=) 2013 * +--EXPR 2014 * | 2015 * +--LITERAL_NEW (new) 2016 * | 2017 * +--IDENT (Foo) 2018 * +--LPAREN (() 2019 * +--ELIST 2020 * +--RPAREN ()) 2021 * +--SEMI (;) 2022 * +--RESOURCE 2023 * | 2024 * +--MODIFIERS 2025 * +--TYPE 2026 * | 2027 * +--IDENT (Bar) 2028 * +--IDENT (bar) 2029 * +--ASSIGN (=) 2030 * +--EXPR 2031 * | 2032 * +--LITERAL_NEW (new) 2033 * | 2034 * +--IDENT (Bar) 2035 * +--LPAREN (() 2036 * +--ELIST 2037 * +--RPAREN ()) 2038 * +--RPAREN ()) 2039 * +--SLIST ({) 2040 * +--RCURLY (}) 2041 * </pre> 2042 * 2043 * <p>Also consider:</p> 2044 * <pre> 2045 * try (BufferedReader br = new BufferedReader(new FileReader(path))) 2046 * { 2047 * return br.readLine(); 2048 * } 2049 * </pre> 2050 * <p>which parses as:</p> 2051 * <pre> 2052 * +--LITERAL_TRY (try) 2053 * | 2054 * +--RESOURCE_SPECIFICATION 2055 * | 2056 * +--LPAREN (() 2057 * +--RESOURCES 2058 * | 2059 * +--RESOURCE 2060 * | 2061 * +--MODIFIERS 2062 * +--TYPE 2063 * | 2064 * +--IDENT (BufferedReader) 2065 * +--IDENT (br) 2066 * +--ASSIGN (=) 2067 * +--EXPR 2068 * | 2069 * +--LITERAL_NEW (new) 2070 * | 2071 * +--IDENT (FileReader) 2072 * +--LPAREN (() 2073 * +--ELIST 2074 * | 2075 * +--EXPR 2076 * | 2077 * +--LITERAL_NEW (new) 2078 * | 2079 * +--IDENT (BufferedReader) 2080 * +--LPAREN (() 2081 * +--ELIST 2082 * | 2083 * +--EXPR 2084 * | 2085 * +--IDENT (path) 2086 * +--RPAREN ()) 2087 * +--RPAREN ()) 2088 * +--RPAREN ()) 2089 * +--SLIST ({) 2090 * | 2091 * +--LITERAL_RETURN (return) 2092 * | 2093 * +--EXPR 2094 * | 2095 * +--METHOD_CALL (() 2096 * | 2097 * +--DOT (.) 2098 * | 2099 * +--IDENT (br) 2100 * +--IDENT (readLine) 2101 * +--ELIST 2102 * +--RPAREN ()) 2103 * +--SEMI (;) 2104 * +--RCURLY (}) 2105 * </pre> 2106 * 2107 * @see #LPAREN 2108 * @see #RESOURCES 2109 * @see #RESOURCE 2110 * @see #SEMI 2111 * @see #RPAREN 2112 * @see #LITERAL_TRY 2113 **/ 2114 public static final int RESOURCE_SPECIFICATION = 2115 GeneratedJavaTokenTypes.RESOURCE_SPECIFICATION; 2116 2117 /** 2118 * A list of resources in the Java 7 try-with-resources construct. 2119 * This is a child of RESOURCE_SPECIFICATION. 2120 * 2121 * @see #RESOURCE_SPECIFICATION 2122 **/ 2123 public static final int RESOURCES = 2124 GeneratedJavaTokenTypes.RESOURCES; 2125 2126 /** 2127 * A resource in the Java 7 try-with-resources construct. 2128 * This is a child of RESOURCES. 2129 * 2130 * @see #RESOURCES 2131 * @see #RESOURCE_SPECIFICATION 2132 **/ 2133 public static final int RESOURCE = 2134 GeneratedJavaTokenTypes.RESOURCE; 2135 2136 /** 2137 * The {@code catch} keyword. 2138 * 2139 * @see #LPAREN 2140 * @see #PARAMETER_DEF 2141 * @see #RPAREN 2142 * @see #SLIST 2143 * @see #LITERAL_TRY 2144 **/ 2145 public static final int LITERAL_CATCH = 2146 GeneratedJavaTokenTypes.LITERAL_catch; 2147 2148 /** 2149 * The {@code finally} keyword. 2150 * 2151 * @see #SLIST 2152 * @see #LITERAL_TRY 2153 **/ 2154 public static final int LITERAL_FINALLY = 2155 GeneratedJavaTokenTypes.LITERAL_finally; 2156 2157 /** 2158 * The {@code +=} (addition assignment) operator. 2159 * 2160 * @see <a 2161 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java 2162 * Language Specification, §15.26.2</a> 2163 * @see #EXPR 2164 **/ 2165 public static final int PLUS_ASSIGN = GeneratedJavaTokenTypes.PLUS_ASSIGN; 2166 /** 2167 * The {@code -=} (subtraction assignment) operator. 2168 * 2169 * @see <a 2170 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java 2171 * Language Specification, §15.26.2</a> 2172 * @see #EXPR 2173 **/ 2174 public static final int MINUS_ASSIGN = 2175 GeneratedJavaTokenTypes.MINUS_ASSIGN; 2176 2177 /** 2178 * The {@code *=} (multiplication assignment) operator. 2179 * 2180 * @see <a 2181 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java 2182 * Language Specification, §15.26.2</a> 2183 * @see #EXPR 2184 **/ 2185 public static final int STAR_ASSIGN = GeneratedJavaTokenTypes.STAR_ASSIGN; 2186 /** 2187 * The {@code /=} (division assignment) operator. 2188 * 2189 * @see <a 2190 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java 2191 * Language Specification, §15.26.2</a> 2192 * @see #EXPR 2193 **/ 2194 public static final int DIV_ASSIGN = GeneratedJavaTokenTypes.DIV_ASSIGN; 2195 /** 2196 * The {@code %=} (remainder assignment) operator. 2197 * 2198 * @see <a 2199 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java 2200 * Language Specification, §15.26.2</a> 2201 * @see #EXPR 2202 **/ 2203 public static final int MOD_ASSIGN = GeneratedJavaTokenTypes.MOD_ASSIGN; 2204 /** 2205 * The {@code >>=} (signed right shift assignment) 2206 * operator. 2207 * 2208 * @see <a 2209 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java 2210 * Language Specification, §15.26.2</a> 2211 * @see #EXPR 2212 **/ 2213 public static final int SR_ASSIGN = GeneratedJavaTokenTypes.SR_ASSIGN; 2214 /** 2215 * The {@code >>>=} (unsigned right shift assignment) 2216 * operator. 2217 * 2218 * @see <a 2219 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java 2220 * Language Specification, §15.26.2</a> 2221 * @see #EXPR 2222 **/ 2223 public static final int BSR_ASSIGN = GeneratedJavaTokenTypes.BSR_ASSIGN; 2224 /** 2225 * The {@code <<=} (left shift assignment) operator. 2226 * 2227 * @see <a 2228 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java 2229 * Language Specification, §15.26.2</a> 2230 * @see #EXPR 2231 **/ 2232 public static final int SL_ASSIGN = GeneratedJavaTokenTypes.SL_ASSIGN; 2233 /** 2234 * The {@code &=} (bitwise AND assignment) operator. 2235 * 2236 * @see <a 2237 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java 2238 * Language Specification, §15.26.2</a> 2239 * @see #EXPR 2240 **/ 2241 public static final int BAND_ASSIGN = GeneratedJavaTokenTypes.BAND_ASSIGN; 2242 /** 2243 * The {@code ^=} (bitwise exclusive OR assignment) operator. 2244 * 2245 * @see <a 2246 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java 2247 * Language Specification, §15.26.2</a> 2248 * @see #EXPR 2249 **/ 2250 public static final int BXOR_ASSIGN = GeneratedJavaTokenTypes.BXOR_ASSIGN; 2251 /** 2252 * The {@code |=} (bitwise OR assignment) operator. 2253 * 2254 * @see <a 2255 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2">Java 2256 * Language Specification, §15.26.2</a> 2257 * @see #EXPR 2258 **/ 2259 public static final int BOR_ASSIGN = GeneratedJavaTokenTypes.BOR_ASSIGN; 2260 /** 2261 * The <code>?</code> (conditional) operator. Technically, 2262 * the colon is also part of this operator, but it appears as a 2263 * separate token. 2264 * 2265 * <p>For example:</p> 2266 * <pre> 2267 * (quantity == 1) ? "": "s" 2268 * </pre> 2269 * <p> 2270 * parses as: 2271 * </p> 2272 * <pre> 2273 * +--QUESTION (?) 2274 * | 2275 * +--LPAREN (() 2276 * +--EQUAL (==) 2277 * | 2278 * +--IDENT (quantity) 2279 * +--NUM_INT (1) 2280 * +--RPAREN ()) 2281 * +--STRING_LITERAL ("") 2282 * +--COLON (:) 2283 * +--STRING_LITERAL ("s") 2284 * </pre> 2285 * 2286 * @see <a 2287 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.25">Java 2288 * Language Specification, §15.25</a> 2289 * @see #EXPR 2290 * @see #COLON 2291 * @noinspection HtmlTagCanBeJavadocTag 2292 **/ 2293 public static final int QUESTION = GeneratedJavaTokenTypes.QUESTION; 2294 /** 2295 * The {@code ||} (conditional OR) operator. 2296 * 2297 * @see <a 2298 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.24">Java 2299 * Language Specification, §15.24</a> 2300 * @see #EXPR 2301 **/ 2302 public static final int LOR = GeneratedJavaTokenTypes.LOR; 2303 /** 2304 * The {@code &&} (conditional AND) operator. 2305 * 2306 * @see <a 2307 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.23">Java 2308 * Language Specification, §15.23</a> 2309 * @see #EXPR 2310 **/ 2311 public static final int LAND = GeneratedJavaTokenTypes.LAND; 2312 /** 2313 * The {@code |} (bitwise OR) operator. 2314 * 2315 * @see <a 2316 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.22.1">Java 2317 * Language Specification, §15.22.1</a> 2318 * @see #EXPR 2319 **/ 2320 public static final int BOR = GeneratedJavaTokenTypes.BOR; 2321 /** 2322 * The {@code ^} (bitwise exclusive OR) operator. 2323 * 2324 * @see <a 2325 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.22.1">Java 2326 * Language Specification, §15.22.1</a> 2327 * @see #EXPR 2328 **/ 2329 public static final int BXOR = GeneratedJavaTokenTypes.BXOR; 2330 /** 2331 * The {@code &} (bitwise AND) operator. 2332 * 2333 * @see <a 2334 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.22.1">Java 2335 * Language Specification, §15.22.1</a> 2336 * @see #EXPR 2337 **/ 2338 public static final int BAND = GeneratedJavaTokenTypes.BAND; 2339 /** 2340 * The <code>!=</code> (not equal) operator. 2341 * 2342 * @see #EXPR 2343 * @noinspection HtmlTagCanBeJavadocTag 2344 **/ 2345 public static final int NOT_EQUAL = GeneratedJavaTokenTypes.NOT_EQUAL; 2346 /** 2347 * The {@code ==} (equal) operator. 2348 * 2349 * @see #EXPR 2350 **/ 2351 public static final int EQUAL = GeneratedJavaTokenTypes.EQUAL; 2352 /** 2353 * The {@code <} (less than) operator. 2354 * 2355 * @see #EXPR 2356 **/ 2357 public static final int LT = GeneratedJavaTokenTypes.LT; 2358 /** 2359 * The {@code >} (greater than) operator. 2360 * 2361 * @see #EXPR 2362 **/ 2363 public static final int GT = GeneratedJavaTokenTypes.GT; 2364 /** 2365 * The {@code <=} (less than or equal) operator. 2366 * 2367 * @see #EXPR 2368 **/ 2369 public static final int LE = GeneratedJavaTokenTypes.LE; 2370 /** 2371 * The {@code >=} (greater than or equal) operator. 2372 * 2373 * @see #EXPR 2374 **/ 2375 public static final int GE = GeneratedJavaTokenTypes.GE; 2376 /** 2377 * The {@code instanceof} operator. The first child is an 2378 * object reference or something that evaluates to an object 2379 * reference. The second child is a reference type. 2380 * 2381 * @see <a 2382 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.20.2">Java 2383 * Language Specification, §15.20.2</a> 2384 * @see #EXPR 2385 * @see #METHOD_CALL 2386 * @see #IDENT 2387 * @see #DOT 2388 * @see #TYPE 2389 * @see FullIdent 2390 **/ 2391 public static final int LITERAL_INSTANCEOF = 2392 GeneratedJavaTokenTypes.LITERAL_instanceof; 2393 2394 /** 2395 * The {@code <<} (shift left) operator. 2396 * 2397 * @see <a 2398 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.19">Java 2399 * Language Specification, §15.19</a> 2400 * @see #EXPR 2401 **/ 2402 public static final int SL = GeneratedJavaTokenTypes.SL; 2403 /** 2404 * The {@code >>} (signed shift right) operator. 2405 * 2406 * @see <a 2407 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.19">Java 2408 * Language Specification, §15.19</a> 2409 * @see #EXPR 2410 **/ 2411 public static final int SR = GeneratedJavaTokenTypes.SR; 2412 /** 2413 * The {@code >>>} (unsigned shift right) operator. 2414 * 2415 * @see <a 2416 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.19">Java 2417 * Language Specification, §15.19</a> 2418 * @see #EXPR 2419 **/ 2420 public static final int BSR = GeneratedJavaTokenTypes.BSR; 2421 /** 2422 * The {@code +} (addition) operator. 2423 * 2424 * @see <a 2425 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.18">Java 2426 * Language Specification, §15.18</a> 2427 * @see #EXPR 2428 **/ 2429 public static final int PLUS = GeneratedJavaTokenTypes.PLUS; 2430 /** 2431 * The {@code -} (subtraction) operator. 2432 * 2433 * @see <a 2434 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.18">Java 2435 * Language Specification, §15.18</a> 2436 * @see #EXPR 2437 **/ 2438 public static final int MINUS = GeneratedJavaTokenTypes.MINUS; 2439 /** 2440 * The {@code /} (division) operator. 2441 * 2442 * @see <a 2443 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.17.2">Java 2444 * Language Specification, §15.17.2</a> 2445 * @see #EXPR 2446 **/ 2447 public static final int DIV = GeneratedJavaTokenTypes.DIV; 2448 /** 2449 * The {@code %} (remainder) operator. 2450 * 2451 * @see <a 2452 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.17.3">Java 2453 * Language Specification, §15.17.3</a> 2454 * @see #EXPR 2455 **/ 2456 public static final int MOD = GeneratedJavaTokenTypes.MOD; 2457 /** 2458 * The {@code ++} (prefix increment) operator. 2459 * 2460 * @see <a 2461 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.15.1">Java 2462 * Language Specification, §15.15.1</a> 2463 * @see #EXPR 2464 * @see #POST_INC 2465 **/ 2466 public static final int INC = GeneratedJavaTokenTypes.INC; 2467 /** 2468 * The {@code --} (prefix decrement) operator. 2469 * 2470 * @see <a 2471 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.15.2">Java 2472 * Language Specification, §15.15.2</a> 2473 * @see #EXPR 2474 * @see #POST_DEC 2475 **/ 2476 public static final int DEC = GeneratedJavaTokenTypes.DEC; 2477 /** 2478 * The {@code ~} (bitwise complement) operator. 2479 * 2480 * @see <a 2481 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.15.5">Java 2482 * Language Specification, §15.15.5</a> 2483 * @see #EXPR 2484 **/ 2485 public static final int BNOT = GeneratedJavaTokenTypes.BNOT; 2486 /** 2487 * The <code>!</code> (logical complement) operator. 2488 * 2489 * @see <a 2490 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.15.6">Java 2491 * Language Specification, §15.15.6</a> 2492 * @see #EXPR 2493 * @noinspection HtmlTagCanBeJavadocTag 2494 **/ 2495 public static final int LNOT = GeneratedJavaTokenTypes.LNOT; 2496 /** 2497 * The {@code true} keyword. 2498 * 2499 * @see <a 2500 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.3">Java 2501 * Language Specification, §3.10.3</a> 2502 * @see #EXPR 2503 * @see #LITERAL_FALSE 2504 **/ 2505 public static final int LITERAL_TRUE = 2506 GeneratedJavaTokenTypes.LITERAL_true; 2507 2508 /** 2509 * The {@code false} keyword. 2510 * 2511 * @see <a 2512 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.3">Java 2513 * Language Specification, §3.10.3</a> 2514 * @see #EXPR 2515 * @see #LITERAL_TRUE 2516 **/ 2517 public static final int LITERAL_FALSE = 2518 GeneratedJavaTokenTypes.LITERAL_false; 2519 2520 /** 2521 * The {@code null} keyword. 2522 * 2523 * @see <a 2524 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.7">Java 2525 * Language Specification, §3.10.7</a> 2526 * @see #EXPR 2527 **/ 2528 public static final int LITERAL_NULL = 2529 GeneratedJavaTokenTypes.LITERAL_null; 2530 2531 /** 2532 * The {@code new} keyword. This element is used to define 2533 * new instances of objects, new arrays, and new anonymous inner 2534 * classes. 2535 * 2536 * <p>For example:</p> 2537 * 2538 * <pre> 2539 * new ArrayList(50) 2540 * </pre> 2541 * 2542 * <p>parses as:</p> 2543 * <pre> 2544 * +--LITERAL_NEW (new) 2545 * | 2546 * +--IDENT (ArrayList) 2547 * +--LPAREN (() 2548 * +--ELIST 2549 * | 2550 * +--EXPR 2551 * | 2552 * +--NUM_INT (50) 2553 * +--RPAREN ()) 2554 * </pre> 2555 * 2556 * <p>For example:</p> 2557 * <pre> 2558 * new float[] 2559 * { 2560 * 3.0f, 2561 * 4.0f 2562 * }; 2563 * </pre> 2564 * 2565 * <p>parses as:</p> 2566 * <pre> 2567 * +--LITERAL_NEW (new) 2568 * | 2569 * +--LITERAL_FLOAT (float) 2570 * +--ARRAY_DECLARATOR ([) 2571 * +--ARRAY_INIT ({) 2572 * | 2573 * +--EXPR 2574 * | 2575 * +--NUM_FLOAT (3.0f) 2576 * +--COMMA (,) 2577 * +--EXPR 2578 * | 2579 * +--NUM_FLOAT (4.0f) 2580 * +--RCURLY (}) 2581 * </pre> 2582 * 2583 * <p>For example:</p> 2584 * <pre> 2585 * new FilenameFilter() 2586 * { 2587 * public boolean accept(File dir, String name) 2588 * { 2589 * return name.endsWith(".java"); 2590 * } 2591 * } 2592 * </pre> 2593 * 2594 * <p>parses as:</p> 2595 * <pre> 2596 * +--LITERAL_NEW (new) 2597 * | 2598 * +--IDENT (FilenameFilter) 2599 * +--LPAREN (() 2600 * +--ELIST 2601 * +--RPAREN ()) 2602 * +--OBJBLOCK 2603 * | 2604 * +--LCURLY ({) 2605 * +--METHOD_DEF 2606 * | 2607 * +--MODIFIERS 2608 * | 2609 * +--LITERAL_PUBLIC (public) 2610 * +--TYPE 2611 * | 2612 * +--LITERAL_BOOLEAN (boolean) 2613 * +--IDENT (accept) 2614 * +--PARAMETERS 2615 * | 2616 * +--PARAMETER_DEF 2617 * | 2618 * +--MODIFIERS 2619 * +--TYPE 2620 * | 2621 * +--IDENT (File) 2622 * +--IDENT (dir) 2623 * +--COMMA (,) 2624 * +--PARAMETER_DEF 2625 * | 2626 * +--MODIFIERS 2627 * +--TYPE 2628 * | 2629 * +--IDENT (String) 2630 * +--IDENT (name) 2631 * +--SLIST ({) 2632 * | 2633 * +--LITERAL_RETURN (return) 2634 * | 2635 * +--EXPR 2636 * | 2637 * +--METHOD_CALL (() 2638 * | 2639 * +--DOT (.) 2640 * | 2641 * +--IDENT (name) 2642 * +--IDENT (endsWith) 2643 * +--ELIST 2644 * | 2645 * +--EXPR 2646 * | 2647 * +--STRING_LITERAL (".java") 2648 * +--RPAREN ()) 2649 * +--SEMI (;) 2650 * +--RCURLY (}) 2651 * +--RCURLY (}) 2652 * </pre> 2653 * 2654 * @see #IDENT 2655 * @see #DOT 2656 * @see #LPAREN 2657 * @see #ELIST 2658 * @see #RPAREN 2659 * @see #OBJBLOCK 2660 * @see #ARRAY_INIT 2661 * @see FullIdent 2662 **/ 2663 public static final int LITERAL_NEW = GeneratedJavaTokenTypes.LITERAL_new; 2664 /** 2665 * An integer literal. These may be specified in decimal, 2666 * hexadecimal, or octal form. 2667 * 2668 * @see <a 2669 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.1">Java 2670 * Language Specification, §3.10.1</a> 2671 * @see #EXPR 2672 * @see #NUM_LONG 2673 **/ 2674 public static final int NUM_INT = GeneratedJavaTokenTypes.NUM_INT; 2675 /** 2676 * A character literal. This is a (possibly escaped) character 2677 * enclosed in single quotes. 2678 * 2679 * @see <a 2680 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.4">Java 2681 * Language Specification, §3.10.4</a> 2682 * @see #EXPR 2683 **/ 2684 public static final int CHAR_LITERAL = 2685 GeneratedJavaTokenTypes.CHAR_LITERAL; 2686 2687 /** 2688 * A string literal. This is a sequence of (possibly escaped) 2689 * characters enclosed in double quotes. 2690 * 2691 * @see <a 2692 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.5">Java 2693 * Language Specification, §3.10.5</a> 2694 * @see #EXPR 2695 **/ 2696 public static final int STRING_LITERAL = 2697 GeneratedJavaTokenTypes.STRING_LITERAL; 2698 2699 /** 2700 * A single precision floating point literal. This is a floating 2701 * point number with an {@code F} or {@code f} suffix. 2702 * 2703 * @see <a 2704 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.2">Java 2705 * Language Specification, §3.10.2</a> 2706 * @see #EXPR 2707 * @see #NUM_DOUBLE 2708 **/ 2709 public static final int NUM_FLOAT = GeneratedJavaTokenTypes.NUM_FLOAT; 2710 /** 2711 * A long integer literal. These are almost the same as integer 2712 * literals, but they have an {@code L} or {@code l} 2713 * (ell) suffix. 2714 * 2715 * @see <a 2716 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.1">Java 2717 * Language Specification, §3.10.1</a> 2718 * @see #EXPR 2719 * @see #NUM_INT 2720 **/ 2721 public static final int NUM_LONG = GeneratedJavaTokenTypes.NUM_LONG; 2722 /** 2723 * A double precision floating point literal. This is a floating 2724 * point number with an optional {@code D} or {@code d} 2725 * suffix. 2726 * 2727 * @see <a 2728 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.2">Java 2729 * Language Specification, §3.10.2</a> 2730 * @see #EXPR 2731 * @see #NUM_FLOAT 2732 **/ 2733 public static final int NUM_DOUBLE = GeneratedJavaTokenTypes.NUM_DOUBLE; 2734 2735 /** 2736 * The {@code assert} keyword. This is only for Java 1.4 and 2737 * later. 2738 * 2739 * <p>For example:</p> 2740 * <pre> 2741 * assert(x==4); 2742 * </pre> 2743 * <p>parses as:</p> 2744 * <pre> 2745 * +--LITERAL_ASSERT (assert) 2746 * | 2747 * +--EXPR 2748 * | 2749 * +--LPAREN (() 2750 * +--EQUAL (==) 2751 * | 2752 * +--IDENT (x) 2753 * +--NUM_INT (4) 2754 * +--RPAREN ()) 2755 * +--SEMI (;) 2756 * </pre> 2757 **/ 2758 public static final int LITERAL_ASSERT = GeneratedJavaTokenTypes.ASSERT; 2759 2760 /** 2761 * A static import declaration. Static import declarations are optional, 2762 * but must appear after the package declaration and before the type 2763 * declaration. 2764 * 2765 * <p>For example:</p> 2766 * 2767 * <pre> 2768 * import static java.io.IOException; 2769 * </pre> 2770 * 2771 * <p>parses as:</p> 2772 * 2773 * <pre> 2774 * +--STATIC_IMPORT (import) 2775 * | 2776 * +--LITERAL_STATIC 2777 * +--DOT (.) 2778 * | 2779 * +--DOT (.) 2780 * | 2781 * +--IDENT (java) 2782 * +--IDENT (io) 2783 * +--IDENT (IOException) 2784 * +--SEMI (;) 2785 * </pre> 2786 * 2787 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201"> 2788 * JSR201</a> 2789 * @see #LITERAL_STATIC 2790 * @see #DOT 2791 * @see #IDENT 2792 * @see #STAR 2793 * @see #SEMI 2794 * @see FullIdent 2795 **/ 2796 public static final int STATIC_IMPORT = 2797 GeneratedJavaTokenTypes.STATIC_IMPORT; 2798 2799 /** 2800 * An enum declaration. Its notable children are 2801 * enum constant declarations followed by 2802 * any construct that may be expected in a class body. 2803 * 2804 * <p>For example:</p> 2805 * <pre> 2806 * public enum MyEnum 2807 * implements Serializable 2808 * { 2809 * FIRST_CONSTANT, 2810 * SECOND_CONSTANT; 2811 * 2812 * public void someMethod() 2813 * { 2814 * } 2815 * } 2816 * </pre> 2817 * <p>parses as:</p> 2818 * <pre> 2819 * +--ENUM_DEF 2820 * | 2821 * +--MODIFIERS 2822 * | 2823 * +--LITERAL_PUBLIC (public) 2824 * +--ENUM (enum) 2825 * +--IDENT (MyEnum) 2826 * +--EXTENDS_CLAUSE 2827 * +--IMPLEMENTS_CLAUSE 2828 * | 2829 * +--IDENT (Serializable) 2830 * +--OBJBLOCK 2831 * | 2832 * +--LCURLY ({) 2833 * +--ENUM_CONSTANT_DEF 2834 * | 2835 * +--IDENT (FIRST_CONSTANT) 2836 * +--COMMA (,) 2837 * +--ENUM_CONSTANT_DEF 2838 * | 2839 * +--IDENT (SECOND_CONSTANT) 2840 * +--SEMI (;) 2841 * +--METHOD_DEF 2842 * | 2843 * +--MODIFIERS 2844 * | 2845 * +--LITERAL_PUBLIC (public) 2846 * +--TYPE 2847 * | 2848 * +--LITERAL_void (void) 2849 * +--IDENT (someMethod) 2850 * +--LPAREN (() 2851 * +--PARAMETERS 2852 * +--RPAREN ()) 2853 * +--SLIST ({) 2854 * | 2855 * +--RCURLY (}) 2856 * +--RCURLY (}) 2857 * </pre> 2858 * 2859 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201"> 2860 * JSR201</a> 2861 * @see #MODIFIERS 2862 * @see #ENUM 2863 * @see #IDENT 2864 * @see #EXTENDS_CLAUSE 2865 * @see #IMPLEMENTS_CLAUSE 2866 * @see #OBJBLOCK 2867 * @see #LITERAL_NEW 2868 * @see #ENUM_CONSTANT_DEF 2869 **/ 2870 public static final int ENUM_DEF = 2871 GeneratedJavaTokenTypes.ENUM_DEF; 2872 2873 /** 2874 * The {@code enum} keyword. This element appears 2875 * as part of an enum declaration. 2876 **/ 2877 public static final int ENUM = 2878 GeneratedJavaTokenTypes.ENUM; 2879 2880 /** 2881 * An enum constant declaration. Its notable children are annotations, 2882 * arguments and object block akin to an anonymous 2883 * inner class' body. 2884 * 2885 * <p>For example:</p> 2886 * <pre> 2887 * SOME_CONSTANT(1) 2888 * { 2889 * public void someMethodOverriddenFromMainBody() 2890 * { 2891 * } 2892 * } 2893 * </pre> 2894 * <p>parses as:</p> 2895 * <pre> 2896 * +--ENUM_CONSTANT_DEF 2897 * | 2898 * +--ANNOTATIONS 2899 * +--IDENT (SOME_CONSTANT) 2900 * +--LPAREN (() 2901 * +--ELIST 2902 * | 2903 * +--EXPR 2904 * | 2905 * +--NUM_INT (1) 2906 * +--RPAREN ()) 2907 * +--OBJBLOCK 2908 * | 2909 * +--LCURLY ({) 2910 * | 2911 * +--METHOD_DEF 2912 * | 2913 * +--MODIFIERS 2914 * | 2915 * +--LITERAL_PUBLIC (public) 2916 * +--TYPE 2917 * | 2918 * +--LITERAL_void (void) 2919 * +--IDENT (someMethodOverriddenFromMainBody) 2920 * +--LPAREN (() 2921 * +--PARAMETERS 2922 * +--RPAREN ()) 2923 * +--SLIST ({) 2924 * | 2925 * +--RCURLY (}) 2926 * +--RCURLY (}) 2927 * </pre> 2928 * 2929 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201"> 2930 * JSR201</a> 2931 * @see #ANNOTATIONS 2932 * @see #MODIFIERS 2933 * @see #IDENT 2934 * @see #ELIST 2935 * @see #OBJBLOCK 2936 **/ 2937 public static final int ENUM_CONSTANT_DEF = 2938 GeneratedJavaTokenTypes.ENUM_CONSTANT_DEF; 2939 2940 /** 2941 * A for-each clause. This is a child of 2942 * {@code LITERAL_FOR}. The children of this element may be 2943 * a parameter definition, the colon literal and an expression. 2944 * 2945 * <p>For example:</p> 2946 * <pre> 2947 * for (int value : values) { 2948 * doSmth(); 2949 * } 2950 * </pre> 2951 * <p>parses as:</p> 2952 * <pre> 2953 * --LITERAL_FOR (for) 2954 * |--LPAREN (() 2955 * |--FOR_EACH_CLAUSE 2956 * | |--VARIABLE_DEF 2957 * | | |--MODIFIERS 2958 * | | |--TYPE 2959 * | | | `--LITERAL_INT (int) 2960 * | | `--IDENT (value) 2961 * | |--COLON (:) 2962 * | `--EXPR 2963 * | `--IDENT (values 2964 * |--RPAREN ()) 2965 * `--SLIST ({) 2966 * |--EXPR 2967 * | `--METHOD_CALL (() 2968 * | |--IDENT (doSmth) 2969 * | |--ELIST 2970 * | `--RPAREN ()) 2971 * |--SEMI (;) 2972 * `--RCURLY (}) 2973 * 2974 * </pre> 2975 * 2976 * @see #VARIABLE_DEF 2977 * @see #ELIST 2978 * @see #LITERAL_FOR 2979 **/ 2980 public static final int FOR_EACH_CLAUSE = 2981 GeneratedJavaTokenTypes.FOR_EACH_CLAUSE; 2982 2983 /** 2984 * An annotation declaration. The notable children are the name of the 2985 * annotation type, annotation field declarations and (constant) fields. 2986 * 2987 * <p>For example:</p> 2988 * <pre> 2989 * public @interface MyAnnotation 2990 * { 2991 * int someValue(); 2992 * } 2993 * </pre> 2994 * <p>parses as:</p> 2995 * <pre> 2996 * +--ANNOTATION_DEF 2997 * | 2998 * +--MODIFIERS 2999 * | 3000 * +--LITERAL_PUBLIC (public) 3001 * +--AT (@) 3002 * +--LITERAL_INTERFACE (interface) 3003 * +--IDENT (MyAnnotation) 3004 * +--OBJBLOCK 3005 * | 3006 * +--LCURLY ({) 3007 * +--ANNOTATION_FIELD_DEF 3008 * | 3009 * +--MODIFIERS 3010 * +--TYPE 3011 * | 3012 * +--LITERAL_INT (int) 3013 * +--IDENT (someValue) 3014 * +--LPAREN (() 3015 * +--RPAREN ()) 3016 * +--SEMI (;) 3017 * +--RCURLY (}) 3018 * </pre> 3019 * 3020 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201"> 3021 * JSR201</a> 3022 * @see #MODIFIERS 3023 * @see #LITERAL_INTERFACE 3024 * @see #IDENT 3025 * @see #OBJBLOCK 3026 * @see #ANNOTATION_FIELD_DEF 3027 **/ 3028 public static final int ANNOTATION_DEF = 3029 GeneratedJavaTokenTypes.ANNOTATION_DEF; 3030 3031 /** 3032 * An annotation field declaration. The notable children are modifiers, 3033 * field type, field name and an optional default value (a conditional 3034 * compile-time constant expression). Default values may also by 3035 * annotations. 3036 * 3037 * <p>For example:</p> 3038 * 3039 * <pre> 3040 * String someField() default "Hello world"; 3041 * </pre> 3042 * 3043 * <p>parses as:</p> 3044 * 3045 * <pre> 3046 * +--ANNOTATION_FIELD_DEF 3047 * | 3048 * +--MODIFIERS 3049 * +--TYPE 3050 * | 3051 * +--IDENT (String) 3052 * +--IDENT (someField) 3053 * +--LPAREN (() 3054 * +--RPAREN ()) 3055 * +--LITERAL_DEFAULT (default) 3056 * +--STRING_LITERAL ("Hello world") 3057 * +--SEMI (;) 3058 * </pre> 3059 * 3060 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201"> 3061 * JSR201</a> 3062 * @see #MODIFIERS 3063 * @see #TYPE 3064 * @see #LITERAL_DEFAULT 3065 */ 3066 public static final int ANNOTATION_FIELD_DEF = 3067 GeneratedJavaTokenTypes.ANNOTATION_FIELD_DEF; 3068 3069 // note: @ is the html escape for '@', 3070 // used here to avoid confusing the javadoc tool 3071 /** 3072 * A collection of annotations on a package or enum constant. 3073 * A collections of annotations will only occur on these nodes 3074 * as all other nodes that may be qualified with an annotation can 3075 * be qualified with any other modifier and hence these annotations 3076 * would be contained in a {@link #MODIFIERS} node. 3077 * 3078 * <p>For example:</p> 3079 * 3080 * <pre> 3081 * @MyAnnotation package blah; 3082 * </pre> 3083 * 3084 * <p>parses as:</p> 3085 * 3086 * <pre> 3087 * +--PACKAGE_DEF (package) 3088 * | 3089 * +--ANNOTATIONS 3090 * | 3091 * +--ANNOTATION 3092 * | 3093 * +--AT (@) 3094 * +--IDENT (MyAnnotation) 3095 * +--IDENT (blah) 3096 * +--SEMI (;) 3097 * </pre> 3098 * 3099 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201"> 3100 * JSR201</a> 3101 * @see #ANNOTATION 3102 * @see #AT 3103 * @see #IDENT 3104 */ 3105 public static final int ANNOTATIONS = 3106 GeneratedJavaTokenTypes.ANNOTATIONS; 3107 3108 // note: @ is the html escape for '@', 3109 // used here to avoid confusing the javadoc tool 3110 /** 3111 * An annotation of a package, type, field, parameter or variable. 3112 * An annotation may occur anywhere modifiers occur (it is a 3113 * type of modifier) and may also occur prior to a package definition. 3114 * The notable children are: The annotation name and either a single 3115 * default annotation value or a sequence of name value pairs. 3116 * Annotation values may also be annotations themselves. 3117 * 3118 * <p>For example:</p> 3119 * 3120 * <pre> 3121 * @MyAnnotation(someField1 = "Hello", 3122 * someField2 = @SomeOtherAnnotation) 3123 * </pre> 3124 * 3125 * <p>parses as:</p> 3126 * 3127 * <pre> 3128 * +--ANNOTATION 3129 * | 3130 * +--AT (@) 3131 * +--IDENT (MyAnnotation) 3132 * +--LPAREN (() 3133 * +--ANNOTATION_MEMBER_VALUE_PAIR 3134 * | 3135 * +--IDENT (someField1) 3136 * +--ASSIGN (=) 3137 * +--ANNOTATION 3138 * | 3139 * +--AT (@) 3140 * +--IDENT (SomeOtherAnnotation) 3141 * +--ANNOTATION_MEMBER_VALUE_PAIR 3142 * | 3143 * +--IDENT (someField2) 3144 * +--ASSIGN (=) 3145 * +--STRING_LITERAL ("Hello") 3146 * +--RPAREN ()) 3147 * </pre> 3148 * 3149 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201"> 3150 * JSR201</a> 3151 * @see #MODIFIERS 3152 * @see #IDENT 3153 * @see #ANNOTATION_MEMBER_VALUE_PAIR 3154 */ 3155 public static final int ANNOTATION = 3156 GeneratedJavaTokenTypes.ANNOTATION; 3157 3158 /** 3159 * An initialization of an annotation member with a value. 3160 * Its children are the name of the member, the assignment literal 3161 * and the (compile-time constant conditional expression) value. 3162 * 3163 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201"> 3164 * JSR201</a> 3165 * @see #ANNOTATION 3166 * @see #IDENT 3167 */ 3168 public static final int ANNOTATION_MEMBER_VALUE_PAIR = 3169 GeneratedJavaTokenTypes.ANNOTATION_MEMBER_VALUE_PAIR; 3170 3171 /** 3172 * An annotation array member initialization. 3173 * Initializers can not be nested. 3174 * An initializer may be present as a default to an annotation 3175 * member, as the single default value to an annotation 3176 * (e.g. @Annotation({1,2})) or as the value of an annotation 3177 * member value pair. 3178 * 3179 * <p>For example:</p> 3180 * 3181 * <pre> 3182 * { 1, 2 } 3183 * </pre> 3184 * 3185 * <p>parses as:</p> 3186 * 3187 * <pre> 3188 * +--ANNOTATION_ARRAY_INIT ({) 3189 * | 3190 * +--NUM_INT (1) 3191 * +--COMMA (,) 3192 * +--NUM_INT (2) 3193 * +--RCURLY (}) 3194 * </pre> 3195 * 3196 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201"> 3197 * JSR201</a> 3198 * @see #ANNOTATION 3199 * @see #IDENT 3200 * @see #ANNOTATION_MEMBER_VALUE_PAIR 3201 */ 3202 public static final int ANNOTATION_ARRAY_INIT = 3203 GeneratedJavaTokenTypes.ANNOTATION_ARRAY_INIT; 3204 3205 /** 3206 * A list of type parameters to a class, interface or 3207 * method definition. Children are LT, at least one 3208 * TYPE_PARAMETER, zero or more of: a COMMAs followed by a single 3209 * TYPE_PARAMETER and a final GT. 3210 * 3211 * <p>For example:</p> 3212 * 3213 * <pre> 3214 * public class Blah<A, B> 3215 * { 3216 * } 3217 * </pre> 3218 * 3219 * <p>parses as:</p> 3220 * 3221 * <pre> 3222 * +--CLASS_DEF ({) 3223 * | 3224 * +--MODIFIERS 3225 * | 3226 * +--LITERAL_PUBLIC (public) 3227 * +--LITERAL_CLASS (class) 3228 * +--IDENT (Blah) 3229 * +--TYPE_PARAMETERS 3230 * | 3231 * +--GENERIC_START (<) 3232 * +--TYPE_PARAMETER 3233 * | 3234 * +--IDENT (A) 3235 * +--COMMA (,) 3236 * +--TYPE_PARAMETER 3237 * | 3238 * +--IDENT (B) 3239 * +--GENERIC_END (>) 3240 * +--OBJBLOCK 3241 * | 3242 * +--LCURLY ({) 3243 * +--NUM_INT (1) 3244 * +--COMMA (,) 3245 * +--NUM_INT (2) 3246 * +--RCURLY (}) 3247 * </pre> 3248 * 3249 * @see <a href="https://www.jcp.org/en/jsr/detail?id=14"> 3250 * JSR14</a> 3251 * @see #GENERIC_START 3252 * @see #GENERIC_END 3253 * @see #TYPE_PARAMETER 3254 * @see #COMMA 3255 */ 3256 public static final int TYPE_PARAMETERS = 3257 GeneratedJavaTokenTypes.TYPE_PARAMETERS; 3258 3259 /** 3260 * A type parameter to a class, interface or method definition. 3261 * Children are the type name and an optional TYPE_UPPER_BOUNDS. 3262 * 3263 * <p>For example:</p> 3264 * 3265 * <pre> 3266 * A extends Collection 3267 * </pre> 3268 * 3269 * <p>parses as:</p> 3270 * 3271 * <pre> 3272 * +--TYPE_PARAMETER 3273 * | 3274 * +--IDENT (A) 3275 * +--TYPE_UPPER_BOUNDS 3276 * | 3277 * +--IDENT (Collection) 3278 * </pre> 3279 * 3280 * @see <a href="https://www.jcp.org/en/jsr/detail?id=14"> 3281 * JSR14</a> 3282 * @see #IDENT 3283 * @see #WILDCARD_TYPE 3284 * @see #TYPE_UPPER_BOUNDS 3285 */ 3286 public static final int TYPE_PARAMETER = 3287 GeneratedJavaTokenTypes.TYPE_PARAMETER; 3288 3289 /** 3290 * A list of type arguments to a type reference or 3291 * a method/ctor invocation. Children are GENERIC_START, at least one 3292 * TYPE_ARGUMENT, zero or more of a COMMAs followed by a single 3293 * TYPE_ARGUMENT, and a final GENERIC_END. 3294 * 3295 * <p>For example:</p> 3296 * 3297 * <pre> 3298 * public Collection<?> a; 3299 * </pre> 3300 * 3301 * <p>parses as:</p> 3302 * 3303 * <pre> 3304 * +--VARIABLE_DEF 3305 * | 3306 * +--MODIFIERS 3307 * | 3308 * +--LITERAL_PUBLIC (public) 3309 * +--TYPE 3310 * | 3311 * +--IDENT (Collection) 3312 * | 3313 * +--TYPE_ARGUMENTS 3314 * | 3315 * +--GENERIC_START (<) 3316 * +--TYPE_ARGUMENT 3317 * | 3318 * +--WILDCARD_TYPE (?) 3319 * +--GENERIC_END (>) 3320 * +--IDENT (a) 3321 * +--SEMI (;) 3322 * </pre> 3323 * 3324 * @see #GENERIC_START 3325 * @see #GENERIC_END 3326 * @see #TYPE_ARGUMENT 3327 * @see #COMMA 3328 */ 3329 public static final int TYPE_ARGUMENTS = 3330 GeneratedJavaTokenTypes.TYPE_ARGUMENTS; 3331 3332 /** 3333 * A type arguments to a type reference or a method/ctor invocation. 3334 * Children are either: type name or wildcard type with possible type 3335 * upper or lower bounds. 3336 * 3337 * <p>For example:</p> 3338 * 3339 * <pre> 3340 * ? super List 3341 * </pre> 3342 * 3343 * <p>parses as:</p> 3344 * 3345 * <pre> 3346 * +--TYPE_ARGUMENT 3347 * | 3348 * +--WILDCARD_TYPE (?) 3349 * +--TYPE_LOWER_BOUNDS 3350 * | 3351 * +--IDENT (List) 3352 * </pre> 3353 * 3354 * @see <a href="https://www.jcp.org/en/jsr/detail?id=14"> 3355 * JSR14</a> 3356 * @see #WILDCARD_TYPE 3357 * @see #TYPE_UPPER_BOUNDS 3358 * @see #TYPE_LOWER_BOUNDS 3359 */ 3360 public static final int TYPE_ARGUMENT = 3361 GeneratedJavaTokenTypes.TYPE_ARGUMENT; 3362 3363 /** 3364 * The type that refers to all types. This node has no children. 3365 * 3366 * @see <a href="https://www.jcp.org/en/jsr/detail?id=14"> 3367 * JSR14</a> 3368 * @see #TYPE_ARGUMENT 3369 * @see #TYPE_UPPER_BOUNDS 3370 * @see #TYPE_LOWER_BOUNDS 3371 */ 3372 public static final int WILDCARD_TYPE = 3373 GeneratedJavaTokenTypes.WILDCARD_TYPE; 3374 3375 /** 3376 * An upper bounds on a wildcard type argument or type parameter. 3377 * This node has one child - the type that is being used for 3378 * the bounding. 3379 * 3380 * @see <a href="https://www.jcp.org/en/jsr/detail?id=14"> 3381 * JSR14</a> 3382 * @see #TYPE_PARAMETER 3383 * @see #TYPE_ARGUMENT 3384 * @see #WILDCARD_TYPE 3385 */ 3386 public static final int TYPE_UPPER_BOUNDS = 3387 GeneratedJavaTokenTypes.TYPE_UPPER_BOUNDS; 3388 3389 /** 3390 * A lower bounds on a wildcard type argument. This node has one child 3391 * - the type that is being used for the bounding. 3392 * 3393 * @see <a href="https://www.jcp.org/en/jsr/detail?id=14"> 3394 * JSR14</a> 3395 * @see #TYPE_ARGUMENT 3396 * @see #WILDCARD_TYPE 3397 */ 3398 public static final int TYPE_LOWER_BOUNDS = 3399 GeneratedJavaTokenTypes.TYPE_LOWER_BOUNDS; 3400 3401 /** 3402 * An {@code @} symbol - signifying an annotation instance or the prefix 3403 * to the interface literal signifying the definition of an annotation 3404 * declaration. 3405 * 3406 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201"> 3407 * JSR201</a> 3408 */ 3409 public static final int AT = GeneratedJavaTokenTypes.AT; 3410 3411 /** 3412 * A triple dot for variable-length parameters. This token only ever occurs 3413 * in a parameter declaration immediately after the type of the parameter. 3414 * 3415 * @see <a href="https://www.jcp.org/en/jsr/detail?id=201"> 3416 * JSR201</a> 3417 */ 3418 public static final int ELLIPSIS = GeneratedJavaTokenTypes.ELLIPSIS; 3419 3420 /** 3421 * The {@code &} symbol when used to extend a generic upper or lower bounds constrain 3422 * or a type cast expression with an additional interface. 3423 * 3424 * <p>Generic type bounds extension: 3425 * {@code class Comparable<T extends Serializable & CharSequence>}</p> 3426 * <pre> 3427 * CLASS_DEF 3428 * |--MODIFIERS 3429 * |--LITERAL_CLASS (class) 3430 * |--IDENT (Comparable) 3431 * +--TYPE_PARAMETERS 3432 * |--GENERIC_START (<) 3433 * |--TYPE_PARAMETER 3434 * | |--IDENT (T) 3435 * | +--TYPE_UPPER_BOUNDS (extends) 3436 * | |--IDENT (Serializable) 3437 * | |--TYPE_EXTENSION_AND (&) 3438 * | +--IDENT (CharSequence) 3439 * +--GENERIC_END (>) 3440 * </pre> 3441 * 3442 * <p>Type cast extension: 3443 * {@code return (CheckedFunction & Serializable) null;}</p> 3444 * <pre> 3445 * LITERAL_RETURN (return) 3446 * |--EXPR 3447 * | +--TYPECAST (() 3448 * | |--TYPE 3449 * | | +--IDENT (CheckedFunction) 3450 * | |--TYPE_EXTENSION_AND (&) 3451 * | |--TYPE 3452 * | | +--IDENT (Serializable) 3453 * | |--RPAREN ()) 3454 * | +--LITERAL_NULL (null) 3455 * +--SEMI (;) 3456 * </pre> 3457 * 3458 * @see #EXTENDS_CLAUSE 3459 * @see #TYPECAST 3460 * @see <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-4.html#jls-4.4"> 3461 * Java Language Specification, §4.4</a> 3462 * @see <a href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.16"> 3463 * Java Language Specification, §15.16</a> 3464 */ 3465 public static final int TYPE_EXTENSION_AND = 3466 GeneratedJavaTokenTypes.TYPE_EXTENSION_AND; 3467 3468 /** 3469 * A {@code <} symbol signifying the start of type arguments or type parameters. 3470 */ 3471 public static final int GENERIC_START = 3472 GeneratedJavaTokenTypes.GENERIC_START; 3473 3474 /** 3475 * A {@code >} symbol signifying the end of type arguments or type parameters. 3476 */ 3477 public static final int GENERIC_END = GeneratedJavaTokenTypes.GENERIC_END; 3478 3479 /** 3480 * Special lambda symbol {@code ->}. 3481 */ 3482 public static final int LAMBDA = GeneratedJavaTokenTypes.LAMBDA; 3483 3484 /** 3485 * Beginning of single line comment: '//'. 3486 * 3487 * <pre> 3488 * +--SINGLE_LINE_COMMENT 3489 * | 3490 * +--COMMENT_CONTENT 3491 * </pre> 3492 */ 3493 public static final int SINGLE_LINE_COMMENT = 3494 GeneratedJavaTokenTypes.SINGLE_LINE_COMMENT; 3495 3496 /** 3497 * Beginning of block comment: '/*'. 3498 * 3499 * <pre> 3500 * +--BLOCK_COMMENT_BEGIN 3501 * | 3502 * +--COMMENT_CONTENT 3503 * +--BLOCK_COMMENT_END 3504 * </pre> 3505 */ 3506 public static final int BLOCK_COMMENT_BEGIN = 3507 GeneratedJavaTokenTypes.BLOCK_COMMENT_BEGIN; 3508 3509 /** 3510 * End of block comment: '*/'. 3511 * 3512 * <pre> 3513 * +--BLOCK_COMMENT_BEGIN 3514 * | 3515 * +--COMMENT_CONTENT 3516 * +--BLOCK_COMMENT_END 3517 * </pre> 3518 */ 3519 public static final int BLOCK_COMMENT_END = 3520 GeneratedJavaTokenTypes.BLOCK_COMMENT_END; 3521 3522 /** 3523 * Text of single-line or block comment. 3524 * 3525 * <pre> 3526 * +--SINGLE_LINE_COMMENT 3527 * | 3528 * +--COMMENT_CONTENT 3529 * </pre> 3530 * 3531 * <pre> 3532 * +--BLOCK_COMMENT_BEGIN 3533 * | 3534 * +--COMMENT_CONTENT 3535 * +--BLOCK_COMMENT_END 3536 * </pre> 3537 */ 3538 public static final int COMMENT_CONTENT = 3539 GeneratedJavaTokenTypes.COMMENT_CONTENT; 3540 3541 /** Prevent instantiation. */ 3542 private TokenTypes() { 3543 } 3544 3545}