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