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