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