1 /* 2 * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 package java.lang.classfile; 26 27 import java.io.IOException; 28 import java.lang.constant.ClassDesc; 29 import java.nio.file.Files; 30 import java.nio.file.Path; 31 import java.util.function.Consumer; 32 import java.util.function.Function; 33 34 import java.lang.classfile.attribute.ModuleAttribute; 35 import java.lang.classfile.attribute.UnknownAttribute; 36 import java.lang.classfile.constantpool.ClassEntry; 37 import java.lang.classfile.constantpool.ConstantPoolBuilder; 38 import java.lang.classfile.constantpool.Utf8Entry; 39 import jdk.internal.classfile.impl.ClassFileImpl; 40 import jdk.internal.classfile.impl.TemporaryConstantPool; 41 import java.lang.reflect.AccessFlag; 42 import java.lang.classfile.attribute.CharacterRangeInfo; 43 import java.lang.classfile.attribute.LocalVariableInfo; 44 import java.lang.classfile.attribute.LocalVariableTypeInfo; 45 import java.lang.classfile.instruction.ExceptionCatch; 46 import java.util.List; 47 import static java.util.Objects.requireNonNull; 48 import static jdk.internal.constant.ConstantUtils.CD_module_info; 49 import jdk.internal.javac.PreviewFeature; 50 51 /** 52 * Represents a context for parsing, transforming, and generating classfiles. 53 * A {@code ClassFile} has a set of options that condition how parsing and 54 * generation is done. 55 * 56 * @since 22 57 */ 58 @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) 59 public sealed interface ClassFile 60 permits ClassFileImpl { 61 62 /** 63 * {@return a context with default options} 64 */ 65 static ClassFile of() { 66 return ClassFileImpl.DEFAULT_CONTEXT; 67 } 68 69 /** 70 * {@return a new context with options altered from the default} 71 * @param options the desired processing options 72 */ 73 static ClassFile of(Option... options) { 74 return of().withOptions(options); 75 } 76 77 /** 78 * {@return a copy of the context with altered options} 79 * @param options the desired processing options 80 */ 81 ClassFile withOptions(Option... options); 82 83 /** 84 * An option that affects the parsing and writing of classfiles. 85 * 86 * @sealedGraph 87 * @since 22 88 */ 89 @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) 90 sealed interface Option { 91 } 92 93 /** 94 * Option describing attribute mappers for custom attributes. 95 * Default is only to process standard attributes. 96 * 97 * @since 22 98 */ 99 @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) 100 sealed interface AttributeMapperOption extends Option 101 permits ClassFileImpl.AttributeMapperOptionImpl { 102 103 /** 104 * {@return an option describing attribute mappers for custom attributes} 105 * @param attributeMapper a function mapping attribute names to attribute mappers 106 */ 107 static AttributeMapperOption of(Function<Utf8Entry, AttributeMapper<?>> attributeMapper) { 108 requireNonNull(attributeMapper); 109 return new ClassFileImpl.AttributeMapperOptionImpl(attributeMapper); 110 } 111 112 /** 113 * {@return the function mapping attribute names to attribute mappers} 114 */ 115 Function<Utf8Entry, AttributeMapper<?>> attributeMapper(); 116 } 117 118 /** 119 * Option describing the class hierarchy resolver to use when generating 120 * stack maps. 121 * 122 * @since 22 123 */ 124 @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) 125 sealed interface ClassHierarchyResolverOption extends Option 126 permits ClassFileImpl.ClassHierarchyResolverOptionImpl { 127 128 /** 129 * {@return an option describing the class hierarchy resolver to use when 130 * generating stack maps} 131 * @param classHierarchyResolver the resolver 132 */ 133 static ClassHierarchyResolverOption of(ClassHierarchyResolver classHierarchyResolver) { 134 requireNonNull(classHierarchyResolver); 135 return new ClassFileImpl.ClassHierarchyResolverOptionImpl(classHierarchyResolver); 136 } 137 138 /** 139 * {@return the class hierarchy resolver} 140 */ 141 ClassHierarchyResolver classHierarchyResolver(); 142 } 143 144 /** 145 * Option describing whether to preserve the original constant pool when 146 * transforming a classfile. Reusing the constant pool enables significant 147 * optimizations in processing time and minimizes differences between the 148 * original and transformed classfile, but may result in a bigger classfile 149 * when a classfile is significantly transformed. 150 * Default is {@code SHARED_POOL} to preserve the original constant 151 * pool. 152 * 153 * @since 22 154 */ 155 @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) 156 enum ConstantPoolSharingOption implements Option { 157 158 /** Preserves the original constant pool when transforming classfile */ 159 SHARED_POOL, 160 161 /** Creates a new constant pool when transforming classfile */ 162 NEW_POOL 163 } 164 165 /** 166 * Option describing whether to patch out unreachable code. 167 * Default is {@code PATCH_DEAD_CODE} to automatically patch out unreachable 168 * code with NOPs. 169 * 170 * @since 22 171 */ 172 @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) 173 enum DeadCodeOption implements Option { 174 175 /** Patch unreachable code */ 176 PATCH_DEAD_CODE, 177 178 /** Keep the unreachable code */ 179 KEEP_DEAD_CODE 180 } 181 182 /** 183 * Option describing whether to filter unresolved labels. 184 * Default is {@code FAIL_ON_DEAD_LABELS} to throw IllegalArgumentException 185 * when any {@link ExceptionCatch}, {@link LocalVariableInfo}, 186 * {@link LocalVariableTypeInfo}, or {@link CharacterRangeInfo} 187 * reference to unresolved {@link Label} during bytecode serialization. 188 * Setting this option to {@code DROP_DEAD_LABELS} filters the above 189 * elements instead. 190 * 191 * @since 22 192 */ 193 @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) 194 enum DeadLabelsOption implements Option { 195 196 /** Fail on unresolved labels */ 197 FAIL_ON_DEAD_LABELS, 198 199 /** Filter unresolved labels */ 200 DROP_DEAD_LABELS 201 } 202 203 /** 204 * Option describing whether to process or discard debug elements. 205 * Debug elements include the local variable table, local variable type 206 * table, and character range table. Discarding debug elements may 207 * reduce the overhead of parsing or transforming classfiles. 208 * Default is {@code PASS_DEBUG} to process debug elements. 209 * 210 * @since 22 211 */ 212 @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) 213 enum DebugElementsOption implements Option { 214 215 /** Process debug elements */ 216 PASS_DEBUG, 217 218 /** Drop debug elements */ 219 DROP_DEBUG 220 } 221 222 /** 223 * Option describing whether to process or discard line numbers. 224 * Discarding line numbers may reduce the overhead of parsing or transforming 225 * classfiles. 226 * Default is {@code PASS_LINE_NUMBERS} to process line numbers. 227 * 228 * @since 22 229 */ 230 @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) 231 enum LineNumbersOption implements Option { 232 233 /** Process line numbers */ 234 PASS_LINE_NUMBERS, 235 236 /** Drop line numbers */ 237 DROP_LINE_NUMBERS; 238 } 239 240 /** 241 * Option describing whether to automatically rewrite short jumps to 242 * long when necessary. 243 * Default is {@code FIX_SHORT_JUMPS} to automatically rewrite jump 244 * instructions. 245 * 246 * @since 22 247 */ 248 @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) 249 enum ShortJumpsOption implements Option { 250 251 /** Automatically convert short jumps to long when necessary */ 252 FIX_SHORT_JUMPS, 253 254 /** Fail if short jump overflows */ 255 FAIL_ON_SHORT_JUMPS 256 } 257 258 /** 259 * Option describing whether to generate stackmaps. 260 * Default is {@code STACK_MAPS_WHEN_REQUIRED} to generate stack 261 * maps for {@link #JAVA_6_VERSION} or above, where specifically for 262 * {@link #JAVA_6_VERSION} the stack maps may not be generated. 263 * @jvms 4.10.1 Verification by Type Checking 264 * 265 * @since 22 266 */ 267 @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) 268 enum StackMapsOption implements Option { 269 270 /** Generate stack maps when required */ 271 STACK_MAPS_WHEN_REQUIRED, 272 273 /** Always generate stack maps */ 274 GENERATE_STACK_MAPS, 275 276 /** Drop stack maps from code */ 277 DROP_STACK_MAPS 278 } 279 280 /** 281 * Option describing whether to process or discard unrecognized or problematic 282 * original attributes when a class, record component, field, method or code is 283 * transformed in its exploded form. 284 * Default is {@code PASS_ALL_ATTRIBUTES} to process all original attributes. 285 * @see AttributeMapper.AttributeStability 286 * 287 * @since 22 288 */ 289 @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) 290 enum AttributesProcessingOption implements Option { 291 292 /** Process all original attributes during transformation */ 293 PASS_ALL_ATTRIBUTES, 294 295 /** Drop unknown attributes during transformation */ 296 DROP_UNKNOWN_ATTRIBUTES, 297 298 /** Drop unknown and unstable original attributes during transformation */ 299 DROP_UNSTABLE_ATRIBUTES; 300 } 301 302 /** 303 * Parse a classfile into a {@link ClassModel}. 304 * @param bytes the bytes of the classfile 305 * @return the class model 306 * @throws IllegalArgumentException or its subclass if the classfile format is 307 * not supported or an incompatibility prevents parsing of the classfile 308 */ 309 ClassModel parse(byte[] bytes); 310 311 /** 312 * Parse a classfile into a {@link ClassModel}. 313 * @param path the path to the classfile 314 * @return the class model 315 * @throws java.io.IOException if an I/O error occurs 316 * @throws IllegalArgumentException or its subclass if the classfile format is 317 * not supported or an incompatibility prevents parsing of the classfile 318 */ 319 default ClassModel parse(Path path) throws IOException { 320 return parse(Files.readAllBytes(path)); 321 } 322 323 /** 324 * Build a classfile into a byte array. 325 * @param thisClass the name of the class to build 326 * @param handler a handler that receives a {@link ClassBuilder} 327 * @return the classfile bytes 328 * @throws IllegalArgumentException if {@code thisClass} represents a primitive type 329 */ 330 default byte[] build(ClassDesc thisClass, 331 Consumer<? super ClassBuilder> handler) { 332 ConstantPoolBuilder pool = ConstantPoolBuilder.of(); 333 return build(pool.classEntry(thisClass), pool, handler); 334 } 335 336 /** 337 * Build a classfile into a byte array using the provided constant pool 338 * builder. 339 * 340 * @param thisClassEntry the name of the class to build 341 * @param constantPool the constant pool builder 342 * @param handler a handler that receives a {@link ClassBuilder} 343 * @return the classfile bytes 344 */ 345 byte[] build(ClassEntry thisClassEntry, 346 ConstantPoolBuilder constantPool, 347 Consumer<? super ClassBuilder> handler); 348 349 /** 350 * Build a classfile into a file. 351 * @param path the path to the file to write 352 * @param thisClass the name of the class to build 353 * @param handler a handler that receives a {@link ClassBuilder} 354 * @throws java.io.IOException if an I/O error occurs 355 */ 356 default void buildTo(Path path, 357 ClassDesc thisClass, 358 Consumer<ClassBuilder> handler) throws IOException { 359 Files.write(path, build(thisClass, handler)); 360 } 361 362 /** 363 * Build a classfile into a file using the provided constant pool 364 * builder. 365 * 366 * @param path the path to the file to write 367 * @param thisClassEntry the name of the class to build 368 * @param constantPool the constant pool builder 369 * @param handler a handler that receives a {@link ClassBuilder} 370 * @throws java.io.IOException if an I/O error occurs 371 */ 372 default void buildTo(Path path, 373 ClassEntry thisClassEntry, 374 ConstantPoolBuilder constantPool, 375 Consumer<? super ClassBuilder> handler) throws IOException { 376 Files.write(path, build(thisClassEntry, constantPool, handler)); 377 } 378 379 /** 380 * Build a module descriptor into a byte array. 381 * @param moduleAttribute the {@code Module} attribute 382 * @return the classfile bytes 383 */ 384 default byte[] buildModule(ModuleAttribute moduleAttribute) { 385 return buildModule(moduleAttribute, clb -> {}); 386 } 387 388 /** 389 * Build a module descriptor into a byte array. 390 * @param moduleAttribute the {@code Module} attribute 391 * @param handler a handler that receives a {@link ClassBuilder} 392 * @return the classfile bytes 393 */ 394 default byte[] buildModule(ModuleAttribute moduleAttribute, 395 Consumer<? super ClassBuilder> handler) { 396 return build(CD_module_info, clb -> { 397 clb.withFlags(AccessFlag.MODULE); 398 clb.with(moduleAttribute); 399 handler.accept(clb); 400 }); 401 } 402 403 /** 404 * Build a module descriptor into a file. 405 * @param path the file to write 406 * @param moduleAttribute the {@code Module} attribute 407 * @throws java.io.IOException if an I/O error occurs 408 */ 409 default void buildModuleTo(Path path, 410 ModuleAttribute moduleAttribute) throws IOException { 411 buildModuleTo(path, moduleAttribute, clb -> {}); 412 } 413 414 /** 415 * Build a module descriptor into a file. 416 * @param path the file to write 417 * @param moduleAttribute the {@code Module} attribute 418 * @param handler a handler that receives a {@link ClassBuilder} 419 * @throws java.io.IOException if an I/O error occurs 420 */ 421 default void buildModuleTo(Path path, 422 ModuleAttribute moduleAttribute, 423 Consumer<? super ClassBuilder> handler) throws IOException { 424 Files.write(path, buildModule(moduleAttribute, handler)); 425 } 426 427 /** 428 * Transform one classfile into a new classfile with the aid of a 429 * {@link ClassTransform}. The transform will receive each element of 430 * this class, as well as a {@link ClassBuilder} for building the new class. 431 * The transform is free to preserve, remove, or replace elements as it 432 * sees fit. 433 * 434 * @implNote 435 * This method behaves as if: 436 * {@snippet lang=java : 437 * this.build(model.thisClass(), ConstantPoolBuilder.of(model), 438 * b -> b.transform(model, transform)); 439 * } 440 * 441 * @param model the class model to transform 442 * @param transform the transform 443 * @return the bytes of the new class 444 */ 445 default byte[] transform(ClassModel model, ClassTransform transform) { 446 return transform(model, model.thisClass(), transform); 447 } 448 449 /** 450 * Transform one classfile into a new classfile with the aid of a 451 * {@link ClassTransform}. The transform will receive each element of 452 * this class, as well as a {@link ClassBuilder} for building the new class. 453 * The transform is free to preserve, remove, or replace elements as it 454 * sees fit. 455 * 456 * @param model the class model to transform 457 * @param newClassName new class name 458 * @param transform the transform 459 * @return the bytes of the new class 460 */ 461 default byte[] transform(ClassModel model, ClassDesc newClassName, ClassTransform transform) { 462 return transform(model, TemporaryConstantPool.INSTANCE.classEntry(newClassName), transform); 463 } 464 465 /** 466 * Transform one classfile into a new classfile with the aid of a 467 * {@link ClassTransform}. The transform will receive each element of 468 * this class, as well as a {@link ClassBuilder} for building the new class. 469 * The transform is free to preserve, remove, or replace elements as it 470 * sees fit. 471 * 472 * @implNote 473 * This method behaves as if: 474 * {@snippet lang=java : 475 * this.build(newClassName, ConstantPoolBuilder.of(model), 476 * b -> b.transform(model, transform)); 477 * } 478 * 479 * @param model the class model to transform 480 * @param newClassName new class name 481 * @param transform the transform 482 * @return the bytes of the new class 483 */ 484 byte[] transform(ClassModel model, ClassEntry newClassName, ClassTransform transform); 485 486 /** 487 * Verify a classfile. Any verification errors found will be returned. 488 * @param model the class model to verify 489 * @return a list of verification errors, or an empty list if no errors are 490 * found 491 */ 492 List<VerifyError> verify(ClassModel model); 493 494 /** 495 * Verify a classfile. Any verification errors found will be returned. 496 * @param bytes the classfile bytes to verify 497 * @return a list of verification errors, or an empty list if no errors are 498 * found 499 */ 500 List<VerifyError> verify(byte[] bytes); 501 502 /** 503 * Verify a classfile. Any verification errors found will be returned. 504 * @param path the classfile path to verify 505 * @return a list of verification errors, or an empty list if no errors are 506 * found 507 * @throws java.io.IOException if an I/O error occurs 508 */ 509 default List<VerifyError> verify(Path path) throws IOException { 510 return verify(Files.readAllBytes(path)); 511 } 512 513 /** 0xCAFEBABE */ 514 int MAGIC_NUMBER = 0xCAFEBABE; 515 516 /** The integer value used to encode the NOP instruction. */ 517 int NOP = 0; 518 519 /** The integer value used to encode the ACONST_NULL instruction. */ 520 int ACONST_NULL = 1; 521 522 /** The integer value used to encode the ICONST_M1 instruction. */ 523 int ICONST_M1 = 2; 524 525 /** The integer value used to encode the ICONST_0 instruction. */ 526 int ICONST_0 = 3; 527 528 /** The integer value used to encode the ICONST_1 instruction. */ 529 int ICONST_1 = 4; 530 531 /** The integer value used to encode the ICONST_2 instruction. */ 532 int ICONST_2 = 5; 533 534 /** The integer value used to encode the ICONST_3 instruction. */ 535 int ICONST_3 = 6; 536 537 /** The integer value used to encode the ICONST_4 instruction. */ 538 int ICONST_4 = 7; 539 540 /** The integer value used to encode the ICONST_5 instruction. */ 541 int ICONST_5 = 8; 542 543 /** The integer value used to encode the LCONST_0 instruction. */ 544 int LCONST_0 = 9; 545 546 /** The integer value used to encode the LCONST_1 instruction. */ 547 int LCONST_1 = 10; 548 549 /** The integer value used to encode the FCONST_0 instruction. */ 550 int FCONST_0 = 11; 551 552 /** The integer value used to encode the FCONST_1 instruction. */ 553 int FCONST_1 = 12; 554 555 /** The integer value used to encode the FCONST_2 instruction. */ 556 int FCONST_2 = 13; 557 558 /** The integer value used to encode the DCONST_0 instruction. */ 559 int DCONST_0 = 14; 560 561 /** The integer value used to encode the DCONST_1 instruction. */ 562 int DCONST_1 = 15; 563 564 /** The integer value used to encode the BIPUSH instruction. */ 565 int BIPUSH = 16; 566 567 /** The integer value used to encode the SIPUSH instruction. */ 568 int SIPUSH = 17; 569 570 /** The integer value used to encode the LDC instruction. */ 571 int LDC = 18; 572 573 /** The integer value used to encode the LDC_W instruction. */ 574 int LDC_W = 19; 575 576 /** The integer value used to encode the LDC2_W instruction. */ 577 int LDC2_W = 20; 578 579 /** The integer value used to encode the ILOAD instruction. */ 580 int ILOAD = 21; 581 582 /** The integer value used to encode the LLOAD instruction. */ 583 int LLOAD = 22; 584 585 /** The integer value used to encode the FLOAD instruction. */ 586 int FLOAD = 23; 587 588 /** The integer value used to encode the DLOAD instruction. */ 589 int DLOAD = 24; 590 591 /** The integer value used to encode the ALOAD instruction. */ 592 int ALOAD = 25; 593 594 /** The integer value used to encode the ILOAD_0 instruction. */ 595 int ILOAD_0 = 26; 596 597 /** The integer value used to encode the ILOAD_1 instruction. */ 598 int ILOAD_1 = 27; 599 600 /** The integer value used to encode the ILOAD_2 instruction. */ 601 int ILOAD_2 = 28; 602 603 /** The integer value used to encode the ILOAD_3 instruction. */ 604 int ILOAD_3 = 29; 605 606 /** The integer value used to encode the LLOAD_0 instruction. */ 607 int LLOAD_0 = 30; 608 609 /** The integer value used to encode the LLOAD_1 instruction. */ 610 int LLOAD_1 = 31; 611 612 /** The integer value used to encode the LLOAD_2 instruction. */ 613 int LLOAD_2 = 32; 614 615 /** The integer value used to encode the LLOAD_3 instruction. */ 616 int LLOAD_3 = 33; 617 618 /** The integer value used to encode the FLOAD_0 instruction. */ 619 int FLOAD_0 = 34; 620 621 /** The integer value used to encode the FLOAD_1 instruction. */ 622 int FLOAD_1 = 35; 623 624 /** The integer value used to encode the FLOAD_2 instruction. */ 625 int FLOAD_2 = 36; 626 627 /** The integer value used to encode the FLOAD_3 instruction. */ 628 int FLOAD_3 = 37; 629 630 /** The integer value used to encode the DLOAD_0 instruction. */ 631 int DLOAD_0 = 38; 632 633 /** The integer value used to encode the DLOAD_1 instruction. */ 634 int DLOAD_1 = 39; 635 636 /** The integer value used to encode the DLOAD_2 instruction. */ 637 int DLOAD_2 = 40; 638 639 /** The integer value used to encode the DLOAD_3 instruction. */ 640 int DLOAD_3 = 41; 641 642 /** The integer value used to encode the ALOAD_0 instruction. */ 643 int ALOAD_0 = 42; 644 645 /** The integer value used to encode the ALOAD_1 instruction. */ 646 int ALOAD_1 = 43; 647 648 /** The integer value used to encode the ALOAD_2 instruction. */ 649 int ALOAD_2 = 44; 650 651 /** The integer value used to encode the ALOAD_3 instruction. */ 652 int ALOAD_3 = 45; 653 654 /** The integer value used to encode the IALOAD instruction. */ 655 int IALOAD = 46; 656 657 /** The integer value used to encode the LALOAD instruction. */ 658 int LALOAD = 47; 659 660 /** The integer value used to encode the FALOAD instruction. */ 661 int FALOAD = 48; 662 663 /** The integer value used to encode the DALOAD instruction. */ 664 int DALOAD = 49; 665 666 /** The integer value used to encode the AALOAD instruction. */ 667 int AALOAD = 50; 668 669 /** The integer value used to encode the BALOAD instruction. */ 670 int BALOAD = 51; 671 672 /** The integer value used to encode the CALOAD instruction. */ 673 int CALOAD = 52; 674 675 /** The integer value used to encode the SALOAD instruction. */ 676 int SALOAD = 53; 677 678 /** The integer value used to encode the ISTORE instruction. */ 679 int ISTORE = 54; 680 681 /** The integer value used to encode the LSTORE instruction. */ 682 int LSTORE = 55; 683 684 /** The integer value used to encode the FSTORE instruction. */ 685 int FSTORE = 56; 686 687 /** The integer value used to encode the DSTORE instruction. */ 688 int DSTORE = 57; 689 690 /** The integer value used to encode the ASTORE instruction. */ 691 int ASTORE = 58; 692 693 /** The integer value used to encode the ISTORE_0 instruction. */ 694 int ISTORE_0 = 59; 695 696 /** The integer value used to encode the ISTORE_1 instruction. */ 697 int ISTORE_1 = 60; 698 699 /** The integer value used to encode the ISTORE_2 instruction. */ 700 int ISTORE_2 = 61; 701 702 /** The integer value used to encode the ISTORE_3 instruction. */ 703 int ISTORE_3 = 62; 704 705 /** The integer value used to encode the LSTORE_0 instruction. */ 706 int LSTORE_0 = 63; 707 708 /** The integer value used to encode the LSTORE_1 instruction. */ 709 int LSTORE_1 = 64; 710 711 /** The integer value used to encode the LSTORE_2 instruction. */ 712 int LSTORE_2 = 65; 713 714 /** The integer value used to encode the LSTORE_3 instruction. */ 715 int LSTORE_3 = 66; 716 717 /** The integer value used to encode the FSTORE_0 instruction. */ 718 int FSTORE_0 = 67; 719 720 /** The integer value used to encode the FSTORE_1 instruction. */ 721 int FSTORE_1 = 68; 722 723 /** The integer value used to encode the FSTORE_2 instruction. */ 724 int FSTORE_2 = 69; 725 726 /** The integer value used to encode the FSTORE_3 instruction. */ 727 int FSTORE_3 = 70; 728 729 /** The integer value used to encode the DSTORE_0 instruction. */ 730 int DSTORE_0 = 71; 731 732 /** The integer value used to encode the DSTORE_1 instruction. */ 733 int DSTORE_1 = 72; 734 735 /** The integer value used to encode the DSTORE_2 instruction. */ 736 int DSTORE_2 = 73; 737 738 /** The integer value used to encode the DSTORE_3 instruction. */ 739 int DSTORE_3 = 74; 740 741 /** The integer value used to encode the ASTORE_0 instruction. */ 742 int ASTORE_0 = 75; 743 744 /** The integer value used to encode the ASTORE_1 instruction. */ 745 int ASTORE_1 = 76; 746 747 /** The integer value used to encode the ASTORE_2 instruction. */ 748 int ASTORE_2 = 77; 749 750 /** The integer value used to encode the ASTORE_3 instruction. */ 751 int ASTORE_3 = 78; 752 753 /** The integer value used to encode the IASTORE instruction. */ 754 int IASTORE = 79; 755 756 /** The integer value used to encode the LASTORE instruction. */ 757 int LASTORE = 80; 758 759 /** The integer value used to encode the FASTORE instruction. */ 760 int FASTORE = 81; 761 762 /** The integer value used to encode the DASTORE instruction. */ 763 int DASTORE = 82; 764 765 /** The integer value used to encode the AASTORE instruction. */ 766 int AASTORE = 83; 767 768 /** The integer value used to encode the BASTORE instruction. */ 769 int BASTORE = 84; 770 771 /** The integer value used to encode the CASTORE instruction. */ 772 int CASTORE = 85; 773 774 /** The integer value used to encode the SASTORE instruction. */ 775 int SASTORE = 86; 776 777 /** The integer value used to encode the POP instruction. */ 778 int POP = 87; 779 780 /** The integer value used to encode the POP2 instruction. */ 781 int POP2 = 88; 782 783 /** The integer value used to encode the DUP instruction. */ 784 int DUP = 89; 785 786 /** The integer value used to encode the DUP_X1 instruction. */ 787 int DUP_X1 = 90; 788 789 /** The integer value used to encode the DUP_X2 instruction. */ 790 int DUP_X2 = 91; 791 792 /** The integer value used to encode the DUP2 instruction. */ 793 int DUP2 = 92; 794 795 /** The integer value used to encode the DUP2_X1 instruction. */ 796 int DUP2_X1 = 93; 797 798 /** The integer value used to encode the DUP2_X2 instruction. */ 799 int DUP2_X2 = 94; 800 801 /** The integer value used to encode the SWAP instruction. */ 802 int SWAP = 95; 803 804 /** The integer value used to encode the IADD instruction. */ 805 int IADD = 96; 806 807 /** The integer value used to encode the LADD instruction. */ 808 int LADD = 97; 809 810 /** The integer value used to encode the FADD instruction. */ 811 int FADD = 98; 812 813 /** The integer value used to encode the DADD instruction. */ 814 int DADD = 99; 815 816 /** The integer value used to encode the ISUB instruction. */ 817 int ISUB = 100; 818 819 /** The integer value used to encode the LSUB instruction. */ 820 int LSUB = 101; 821 822 /** The integer value used to encode the FSUB instruction. */ 823 int FSUB = 102; 824 825 /** The integer value used to encode the DSUB instruction. */ 826 int DSUB = 103; 827 828 /** The integer value used to encode the IMUL instruction. */ 829 int IMUL = 104; 830 831 /** The integer value used to encode the LMUL instruction. */ 832 int LMUL = 105; 833 834 /** The integer value used to encode the FMUL instruction. */ 835 int FMUL = 106; 836 837 /** The integer value used to encode the DMUL instruction. */ 838 int DMUL = 107; 839 840 /** The integer value used to encode the IDIV instruction. */ 841 int IDIV = 108; 842 843 /** The integer value used to encode the LDIV instruction. */ 844 int LDIV = 109; 845 846 /** The integer value used to encode the FDIV instruction. */ 847 int FDIV = 110; 848 849 /** The integer value used to encode the DDIV instruction. */ 850 int DDIV = 111; 851 852 /** The integer value used to encode the IREM instruction. */ 853 int IREM = 112; 854 855 /** The integer value used to encode the LREM instruction. */ 856 int LREM = 113; 857 858 /** The integer value used to encode the FREM instruction. */ 859 int FREM = 114; 860 861 /** The integer value used to encode the DREM instruction. */ 862 int DREM = 115; 863 864 /** The integer value used to encode the INEG instruction. */ 865 int INEG = 116; 866 867 /** The integer value used to encode the LNEG instruction. */ 868 int LNEG = 117; 869 870 /** The integer value used to encode the FNEG instruction. */ 871 int FNEG = 118; 872 873 /** The integer value used to encode the DNEG instruction. */ 874 int DNEG = 119; 875 876 /** The integer value used to encode the ISHL instruction. */ 877 int ISHL = 120; 878 879 /** The integer value used to encode the LSHL instruction. */ 880 int LSHL = 121; 881 882 /** The integer value used to encode the ISHR instruction. */ 883 int ISHR = 122; 884 885 /** The integer value used to encode the LSHR instruction. */ 886 int LSHR = 123; 887 888 /** The integer value used to encode the IUSHR instruction. */ 889 int IUSHR = 124; 890 891 /** The integer value used to encode the LUSHR instruction. */ 892 int LUSHR = 125; 893 894 /** The integer value used to encode the IAND instruction. */ 895 int IAND = 126; 896 897 /** The integer value used to encode the LAND instruction. */ 898 int LAND = 127; 899 900 /** The integer value used to encode the IOR instruction. */ 901 int IOR = 128; 902 903 /** The integer value used to encode the LOR instruction. */ 904 int LOR = 129; 905 906 /** The integer value used to encode the IXOR instruction. */ 907 int IXOR = 130; 908 909 /** The integer value used to encode the LXOR instruction. */ 910 int LXOR = 131; 911 912 /** The integer value used to encode the IINC instruction. */ 913 int IINC = 132; 914 915 /** The integer value used to encode the I2L instruction. */ 916 int I2L = 133; 917 918 /** The integer value used to encode the I2F instruction. */ 919 int I2F = 134; 920 921 /** The integer value used to encode the I2D instruction. */ 922 int I2D = 135; 923 924 /** The integer value used to encode the L2I instruction. */ 925 int L2I = 136; 926 927 /** The integer value used to encode the L2F instruction. */ 928 int L2F = 137; 929 930 /** The integer value used to encode the L2D instruction. */ 931 int L2D = 138; 932 933 /** The integer value used to encode the F2I instruction. */ 934 int F2I = 139; 935 936 /** The integer value used to encode the F2L instruction. */ 937 int F2L = 140; 938 939 /** The integer value used to encode the F2D instruction. */ 940 int F2D = 141; 941 942 /** The integer value used to encode the D2I instruction. */ 943 int D2I = 142; 944 945 /** The integer value used to encode the D2L instruction. */ 946 int D2L = 143; 947 948 /** The integer value used to encode the D2F instruction. */ 949 int D2F = 144; 950 951 /** The integer value used to encode the I2B instruction. */ 952 int I2B = 145; 953 954 /** The integer value used to encode the I2C instruction. */ 955 int I2C = 146; 956 957 /** The integer value used to encode the I2S instruction. */ 958 int I2S = 147; 959 960 /** The integer value used to encode the LCMP instruction. */ 961 int LCMP = 148; 962 963 /** The integer value used to encode the FCMPL instruction. */ 964 int FCMPL = 149; 965 966 /** The integer value used to encode the FCMPG instruction. */ 967 int FCMPG = 150; 968 969 /** The integer value used to encode the DCMPL instruction. */ 970 int DCMPL = 151; 971 972 /** The integer value used to encode the DCMPG instruction. */ 973 int DCMPG = 152; 974 975 /** The integer value used to encode the IFEQ instruction. */ 976 int IFEQ = 153; 977 978 /** The integer value used to encode the IFNE instruction. */ 979 int IFNE = 154; 980 981 /** The integer value used to encode the IFLT instruction. */ 982 int IFLT = 155; 983 984 /** The integer value used to encode the IFGE instruction. */ 985 int IFGE = 156; 986 987 /** The integer value used to encode the IFGT instruction. */ 988 int IFGT = 157; 989 990 /** The integer value used to encode the IFLE instruction. */ 991 int IFLE = 158; 992 993 /** The integer value used to encode the IF_ICMPEQ instruction. */ 994 int IF_ICMPEQ = 159; 995 996 /** The integer value used to encode the IF_ICMPNE instruction. */ 997 int IF_ICMPNE = 160; 998 999 /** The integer value used to encode the IF_ICMPLT instruction. */ 1000 int IF_ICMPLT = 161; 1001 1002 /** The integer value used to encode the IF_ICMPGE instruction. */ 1003 int IF_ICMPGE = 162; 1004 1005 /** The integer value used to encode the IF_ICMPGT instruction. */ 1006 int IF_ICMPGT = 163; 1007 1008 /** The integer value used to encode the IF_ICMPLE instruction. */ 1009 int IF_ICMPLE = 164; 1010 1011 /** The integer value used to encode the IF_ACMPEQ instruction. */ 1012 int IF_ACMPEQ = 165; 1013 1014 /** The integer value used to encode the IF_ACMPNE instruction. */ 1015 int IF_ACMPNE = 166; 1016 1017 /** The integer value used to encode the GOTO instruction. */ 1018 int GOTO = 167; 1019 1020 /** The integer value used to encode the JSR instruction. */ 1021 int JSR = 168; 1022 1023 /** The integer value used to encode the RET instruction. */ 1024 int RET = 169; 1025 1026 /** The integer value used to encode the TABLESWITCH instruction. */ 1027 int TABLESWITCH = 170; 1028 1029 /** The integer value used to encode the LOOKUPSWITCH instruction. */ 1030 int LOOKUPSWITCH = 171; 1031 1032 /** The integer value used to encode the IRETURN instruction. */ 1033 int IRETURN = 172; 1034 1035 /** The integer value used to encode the LRETURN instruction. */ 1036 int LRETURN = 173; 1037 1038 /** The integer value used to encode the FRETURN instruction. */ 1039 int FRETURN = 174; 1040 1041 /** The integer value used to encode the DRETURN instruction. */ 1042 int DRETURN = 175; 1043 1044 /** The integer value used to encode the ARETURN instruction. */ 1045 int ARETURN = 176; 1046 1047 /** The integer value used to encode the RETURN instruction. */ 1048 int RETURN = 177; 1049 1050 /** The integer value used to encode the GETSTATIC instruction. */ 1051 int GETSTATIC = 178; 1052 1053 /** The integer value used to encode the PUTSTATIC instruction. */ 1054 int PUTSTATIC = 179; 1055 1056 /** The integer value used to encode the GETFIELD instruction. */ 1057 int GETFIELD = 180; 1058 1059 /** The integer value used to encode the PUTFIELD instruction. */ 1060 int PUTFIELD = 181; 1061 1062 /** The integer value used to encode the INVOKEVIRTUAL instruction. */ 1063 int INVOKEVIRTUAL = 182; 1064 1065 /** The integer value used to encode the INVOKESPECIAL instruction. */ 1066 int INVOKESPECIAL = 183; 1067 1068 /** The integer value used to encode the INVOKESTATIC instruction. */ 1069 int INVOKESTATIC = 184; 1070 1071 /** The integer value used to encode the INVOKEINTERFACE instruction. */ 1072 int INVOKEINTERFACE = 185; 1073 1074 /** The integer value used to encode the INVOKEDYNAMIC instruction. */ 1075 int INVOKEDYNAMIC = 186; 1076 1077 /** The integer value used to encode the NEW instruction. */ 1078 int NEW = 187; 1079 1080 /** The integer value used to encode the NEWARRAY instruction. */ 1081 int NEWARRAY = 188; 1082 1083 /** The integer value used to encode the ANEWARRAY instruction. */ 1084 int ANEWARRAY = 189; 1085 1086 /** The integer value used to encode the ARRAYLENGTH instruction. */ 1087 int ARRAYLENGTH = 190; 1088 1089 /** The integer value used to encode the ATHROW instruction. */ 1090 int ATHROW = 191; 1091 1092 /** The integer value used to encode the CHECKCAST instruction. */ 1093 int CHECKCAST = 192; 1094 1095 /** The integer value used to encode the INSTANCEOF instruction. */ 1096 int INSTANCEOF = 193; 1097 1098 /** The integer value used to encode the MONITORENTER instruction. */ 1099 int MONITORENTER = 194; 1100 1101 /** The integer value used to encode the MONITOREXIT instruction. */ 1102 int MONITOREXIT = 195; 1103 1104 /** The integer value used to encode the WIDE instruction. */ 1105 int WIDE = 196; 1106 1107 /** The integer value used to encode the MULTIANEWARRAY instruction. */ 1108 int MULTIANEWARRAY = 197; 1109 1110 /** The integer value used to encode the IFNULL instruction. */ 1111 int IFNULL = 198; 1112 1113 /** The integer value used to encode the IFNONNULL instruction. */ 1114 int IFNONNULL = 199; 1115 1116 /** The integer value used to encode the GOTO_W instruction. */ 1117 int GOTO_W = 200; 1118 1119 /** The integer value used to encode the JSR_W instruction. */ 1120 int JSR_W = 201; 1121 1122 /** The value of PUBLIC access and property modifier. */ 1123 int ACC_PUBLIC = 0x0001; 1124 1125 /** The value of PROTECTED access and property modifier. */ 1126 int ACC_PROTECTED = 0x0004; 1127 1128 /** The value of PRIVATE access and property modifier. */ 1129 int ACC_PRIVATE = 0x0002; 1130 1131 /** The value of INTERFACE access and property modifier. */ 1132 int ACC_INTERFACE = 0x0200; 1133 1134 /** The value of ENUM access and property modifier. */ 1135 int ACC_ENUM = 0x4000; 1136 1137 /** The value of ANNOTATION access and property modifier. */ 1138 int ACC_ANNOTATION = 0x2000; 1139 1140 /** The value of SUPER access and property modifier. */ 1141 int ACC_SUPER = 0x0020; 1142 1143 /** The value of ABSTRACT access and property modifier. */ 1144 int ACC_ABSTRACT = 0x0400; 1145 1146 /** The value of VOLATILE access and property modifier. */ 1147 int ACC_VOLATILE = 0x0040; 1148 1149 /** The value of TRANSIENT access and property modifier. */ 1150 int ACC_TRANSIENT = 0x0080; 1151 1152 /** The value of SYNTHETIC access and property modifier. */ 1153 int ACC_SYNTHETIC = 0x1000; 1154 1155 /** The value of STATIC access and property modifier. */ 1156 int ACC_STATIC = 0x0008; 1157 1158 /** The value of FINAL access and property modifier. */ 1159 int ACC_FINAL = 0x0010; 1160 1161 /** The value of SYNCHRONIZED access and property modifier. */ 1162 int ACC_SYNCHRONIZED = 0x0020; 1163 1164 /** The value of BRIDGE access and property modifier. */ 1165 int ACC_BRIDGE = 0x0040; 1166 1167 /** The value of VARARGS access and property modifier. */ 1168 int ACC_VARARGS = 0x0080; 1169 1170 /** The value of NATIVE access and property modifier. */ 1171 int ACC_NATIVE = 0x0100; 1172 1173 /** The value of STRICT access and property modifier. */ 1174 int ACC_STRICT = 0x0800; 1175 1176 /** The value of MODULE access and property modifier. */ 1177 int ACC_MODULE = 0x8000; 1178 1179 /** The value of OPEN access and property modifier. */ 1180 int ACC_OPEN = 0x20; 1181 1182 /** The value of MANDATED access and property modifier. */ 1183 int ACC_MANDATED = 0x8000; 1184 1185 /** The value of TRANSITIVE access and property modifier. */ 1186 int ACC_TRANSITIVE = 0x20; 1187 1188 /** The value of STATIC_PHASE access and property modifier. */ 1189 int ACC_STATIC_PHASE = 0x40; 1190 1191 /** The value of STATEMENT {@link CharacterRangeInfo} kind. */ 1192 int CRT_STATEMENT = 0x0001; 1193 1194 /** The value of BLOCK {@link CharacterRangeInfo} kind. */ 1195 int CRT_BLOCK = 0x0002; 1196 1197 /** The value of ASSIGNMENT {@link CharacterRangeInfo} kind. */ 1198 int CRT_ASSIGNMENT = 0x0004; 1199 1200 /** The value of FLOW_CONTROLLER {@link CharacterRangeInfo} kind. */ 1201 int CRT_FLOW_CONTROLLER = 0x0008; 1202 1203 /** The value of FLOW_TARGET {@link CharacterRangeInfo} kind. */ 1204 int CRT_FLOW_TARGET = 0x0010; 1205 1206 /** The value of INVOKE {@link CharacterRangeInfo} kind. */ 1207 int CRT_INVOKE = 0x0020; 1208 1209 /** The value of CREATE {@link CharacterRangeInfo} kind. */ 1210 int CRT_CREATE = 0x0040; 1211 1212 /** The value of BRANCH_TRUE {@link CharacterRangeInfo} kind. */ 1213 int CRT_BRANCH_TRUE = 0x0080; 1214 1215 /** The value of BRANCH_FALSE {@link CharacterRangeInfo} kind. */ 1216 int CRT_BRANCH_FALSE = 0x0100; 1217 1218 /** The value of constant pool tag CLASS. */ 1219 int TAG_CLASS = 7; 1220 1221 /** The value of constant pool tag CONSTANTDYNAMIC. */ 1222 int TAG_CONSTANTDYNAMIC = 17; 1223 1224 /** The value of constant pool tag DOUBLE. */ 1225 int TAG_DOUBLE = 6; 1226 1227 /** The value of constant pool tag FIELDREF. */ 1228 int TAG_FIELDREF = 9; 1229 1230 /** The value of constant pool tag FLOAT. */ 1231 int TAG_FLOAT = 4; 1232 1233 /** The value of constant pool tag INTEGER. */ 1234 int TAG_INTEGER = 3; 1235 1236 /** The value of constant pool tag INTERFACEMETHODREF. */ 1237 int TAG_INTERFACEMETHODREF = 11; 1238 1239 /** The value of constant pool tag INVOKEDYNAMIC. */ 1240 int TAG_INVOKEDYNAMIC = 18; 1241 1242 /** The value of constant pool tag LONG. */ 1243 int TAG_LONG = 5; 1244 1245 /** The value of constant pool tag METHODHANDLE. */ 1246 int TAG_METHODHANDLE = 15; 1247 1248 /** The value of constant pool tag METHODREF. */ 1249 int TAG_METHODREF = 10; 1250 1251 /** The value of constant pool tag METHODTYPE. */ 1252 int TAG_METHODTYPE = 16; 1253 1254 /** The value of constant pool tag MODULE. */ 1255 int TAG_MODULE = 19; 1256 1257 /** The value of constant pool tag NAMEANDTYPE. */ 1258 int TAG_NAMEANDTYPE = 12; 1259 1260 /** The value of constant pool tag PACKAGE. */ 1261 int TAG_PACKAGE = 20; 1262 1263 /** The value of constant pool tag STRING. */ 1264 int TAG_STRING = 8; 1265 1266 /** The value of constant pool tag UNICODE. */ 1267 int TAG_UNICODE = 2; 1268 1269 /** The value of constant pool tag UTF8. */ 1270 int TAG_UTF8 = 1; 1271 1272 // annotation element values 1273 1274 /** The value of annotation element value type AEV_BYTE. */ 1275 int AEV_BYTE = 'B'; 1276 1277 /** The value of annotation element value type AEV_CHAR. */ 1278 int AEV_CHAR = 'C'; 1279 1280 /** The value of annotation element value type AEV_DOUBLE. */ 1281 int AEV_DOUBLE = 'D'; 1282 1283 /** The value of annotation element value type AEV_FLOAT. */ 1284 int AEV_FLOAT = 'F'; 1285 1286 /** The value of annotation element value type AEV_INT. */ 1287 int AEV_INT = 'I'; 1288 1289 /** The value of annotation element value type AEV_LONG. */ 1290 int AEV_LONG = 'J'; 1291 1292 /** The value of annotation element value type AEV_SHORT. */ 1293 int AEV_SHORT = 'S'; 1294 1295 /** The value of annotation element value type AEV_BOOLEAN. */ 1296 int AEV_BOOLEAN = 'Z'; 1297 1298 /** The value of annotation element value type AEV_STRING. */ 1299 int AEV_STRING = 's'; 1300 1301 /** The value of annotation element value type AEV_ENUM. */ 1302 int AEV_ENUM = 'e'; 1303 1304 /** The value of annotation element value type AEV_CLASS. */ 1305 int AEV_CLASS = 'c'; 1306 1307 /** The value of annotation element value type AEV_ANNOTATION. */ 1308 int AEV_ANNOTATION = '@'; 1309 1310 /** The value of annotation element value type AEV_ARRAY. */ 1311 int AEV_ARRAY = '['; 1312 1313 //type annotations 1314 1315 /** The value of type annotation target type CLASS_TYPE_PARAMETER. */ 1316 int TAT_CLASS_TYPE_PARAMETER = 0x00; 1317 1318 /** The value of type annotation target type METHOD_TYPE_PARAMETER. */ 1319 int TAT_METHOD_TYPE_PARAMETER = 0x01; 1320 1321 /** The value of type annotation target type CLASS_EXTENDS. */ 1322 int TAT_CLASS_EXTENDS = 0x10; 1323 1324 /** The value of type annotation target type CLASS_TYPE_PARAMETER_BOUND. */ 1325 int TAT_CLASS_TYPE_PARAMETER_BOUND = 0x11; 1326 1327 /** The value of type annotation target type METHOD_TYPE_PARAMETER_BOUND. */ 1328 int TAT_METHOD_TYPE_PARAMETER_BOUND = 0x12; 1329 1330 /** The value of type annotation target type FIELD. */ 1331 int TAT_FIELD = 0x13; 1332 1333 /** The value of type annotation target type METHOD_RETURN. */ 1334 int TAT_METHOD_RETURN = 0x14; 1335 1336 /** The value of type annotation target type METHOD_RECEIVER. */ 1337 int TAT_METHOD_RECEIVER = 0x15; 1338 1339 /** The value of type annotation target type METHOD_FORMAL_PARAMETER. */ 1340 int TAT_METHOD_FORMAL_PARAMETER = 0x16; 1341 1342 /** The value of type annotation target type THROWS. */ 1343 int TAT_THROWS = 0x17; 1344 1345 /** The value of type annotation target type LOCAL_VARIABLE. */ 1346 int TAT_LOCAL_VARIABLE = 0x40; 1347 1348 /** The value of type annotation target type RESOURCE_VARIABLE. */ 1349 int TAT_RESOURCE_VARIABLE = 0x41; 1350 1351 /** The value of type annotation target type EXCEPTION_PARAMETER. */ 1352 int TAT_EXCEPTION_PARAMETER = 0x42; 1353 1354 /** The value of type annotation target type INSTANCEOF. */ 1355 int TAT_INSTANCEOF = 0x43; 1356 1357 /** The value of type annotation target type NEW. */ 1358 int TAT_NEW = 0x44; 1359 1360 /** The value of type annotation target type CONSTRUCTOR_REFERENCE. */ 1361 int TAT_CONSTRUCTOR_REFERENCE = 0x45; 1362 1363 /** The value of type annotation target type METHOD_REFERENCE. */ 1364 int TAT_METHOD_REFERENCE = 0x46; 1365 1366 /** The value of type annotation target type CAST. */ 1367 int TAT_CAST = 0x47; 1368 1369 /** The value of type annotation target type CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT. */ 1370 int TAT_CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT = 0x48; 1371 1372 /** The value of type annotation target type METHOD_INVOCATION_TYPE_ARGUMENT. */ 1373 int TAT_METHOD_INVOCATION_TYPE_ARGUMENT = 0x49; 1374 1375 /** The value of type annotation target type CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT. */ 1376 int TAT_CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT = 0x4A; 1377 1378 /** The value of type annotation target type METHOD_REFERENCE_TYPE_ARGUMENT. */ 1379 int TAT_METHOD_REFERENCE_TYPE_ARGUMENT = 0x4B; 1380 1381 //stackmap verification types 1382 1383 /** The value of verification type TOP. */ 1384 int VT_TOP = 0; 1385 1386 /** The value of verification type INTEGER. */ 1387 int VT_INTEGER = 1; 1388 1389 /** The value of verification type FLOAT. */ 1390 int VT_FLOAT = 2; 1391 1392 /** The value of verification type DOUBLE. */ 1393 int VT_DOUBLE = 3; 1394 1395 /** The value of verification type LONG. */ 1396 int VT_LONG = 4; 1397 1398 /** The value of verification type NULL. */ 1399 int VT_NULL = 5; 1400 1401 /** The value of verification type UNINITIALIZED_THIS. */ 1402 int VT_UNINITIALIZED_THIS = 6; 1403 1404 /** The value of verification type OBJECT. */ 1405 int VT_OBJECT = 7; 1406 1407 /** The value of verification type UNINITIALIZED. */ 1408 int VT_UNINITIALIZED = 8; 1409 1410 /** The value of default class access flags */ 1411 int DEFAULT_CLASS_FLAGS = ACC_PUBLIC; 1412 1413 /** The class major version of JAVA_1. */ 1414 int JAVA_1_VERSION = 45; 1415 1416 /** The class major version of JAVA_2. */ 1417 int JAVA_2_VERSION = 46; 1418 1419 /** The class major version of JAVA_3. */ 1420 int JAVA_3_VERSION = 47; 1421 1422 /** The class major version of JAVA_4. */ 1423 int JAVA_4_VERSION = 48; 1424 1425 /** The class major version of JAVA_5. */ 1426 int JAVA_5_VERSION = 49; 1427 1428 /** The class major version of JAVA_6. */ 1429 int JAVA_6_VERSION = 50; 1430 1431 /** The class major version of JAVA_7. */ 1432 int JAVA_7_VERSION = 51; 1433 1434 /** The class major version of JAVA_8. */ 1435 int JAVA_8_VERSION = 52; 1436 1437 /** The class major version of JAVA_9. */ 1438 int JAVA_9_VERSION = 53; 1439 1440 /** The class major version of JAVA_10. */ 1441 int JAVA_10_VERSION = 54; 1442 1443 /** The class major version of JAVA_11. */ 1444 int JAVA_11_VERSION = 55; 1445 1446 /** The class major version of JAVA_12. */ 1447 int JAVA_12_VERSION = 56; 1448 1449 /** The class major version of JAVA_13. */ 1450 int JAVA_13_VERSION = 57; 1451 1452 /** The class major version of JAVA_14. */ 1453 int JAVA_14_VERSION = 58; 1454 1455 /** The class major version of JAVA_15. */ 1456 int JAVA_15_VERSION = 59; 1457 1458 /** The class major version of JAVA_16. */ 1459 int JAVA_16_VERSION = 60; 1460 1461 /** The class major version of JAVA_17. */ 1462 int JAVA_17_VERSION = 61; 1463 1464 /** The class major version of JAVA_18. */ 1465 int JAVA_18_VERSION = 62; 1466 1467 /** The class major version of JAVA_19. */ 1468 int JAVA_19_VERSION = 63; 1469 1470 /** The class major version of JAVA_20. */ 1471 int JAVA_20_VERSION = 64; 1472 1473 /** The class major version of JAVA_21. */ 1474 int JAVA_21_VERSION = 65; 1475 1476 /** The class major version of JAVA_22. */ 1477 int JAVA_22_VERSION = 66; 1478 1479 /** 1480 * The class major version of JAVA_23. 1481 * @since 23 1482 */ 1483 int JAVA_23_VERSION = 67; 1484 1485 /** 1486 * The class major version of JAVA_24. 1487 * @since 24 1488 */ 1489 int JAVA_24_VERSION = 68; 1490 1491 /** 1492 * A minor version number indicating a class uses preview features 1493 * of a Java SE version since 12, for major versions {@value 1494 * #JAVA_12_VERSION} and above. 1495 */ 1496 int PREVIEW_MINOR_VERSION = 65535; 1497 1498 /** 1499 * {@return the latest major Java version} 1500 */ 1501 static int latestMajorVersion() { 1502 return JAVA_24_VERSION; 1503 } 1504 1505 /** 1506 * {@return the latest minor Java version} 1507 */ 1508 static int latestMinorVersion() { 1509 return 0; 1510 } 1511 1512 }