View Javadoc
1   /*
2    * MIT License
3    * Copyright (c) 2006-2025 JMockit developers
4    * See LICENSE file for full license text.
5    */
6   package mockit.asm.jvmConstants;
7   
8   /**
9    * Constants for <a href="https://docs.oracle.com/javase/specs/jvms/se12/html/jvms-4.html#jvms-4.4-140">types of
10   * items</a> in the constant pool of a class.
11   */
12  public interface ConstantPoolTypes {
13      int UTF8 = 1; // CONSTANT_Utf8
14      int INTEGER = 3; // CONSTANT_Integer
15      int FLOAT = 4; // CONSTANT_Float
16      int LONG = 5; // CONSTANT_Long
17      int DOUBLE = 6; // CONSTANT_Double
18      int CLASS = 7; // CONSTANT_Class
19      int STRING = 8; // CONSTANT_String
20      int FIELD_REF = 9; // CONSTANT_Fieldref
21      int METHOD_REF = 10; // CONSTANT_Methodref
22      int IMETHOD_REF = 11; // CONSTANT_InterfaceMethodref
23      int NAME_TYPE = 12; // CONSTANT_NameAndType
24      int METHOD_HANDLE = 15; // CONSTANT_MethodHandle
25      int METHOD_TYPE = 16; // CONSTANT_MethodType
26      int DYNAMIC = 17; // CONSTANT_Dynamic
27      int INVOKE_DYNAMIC = 18; // CONSTANT_InvokeDynamic
28      int MODULE = 19; // CONSTANT_Module
29      int PACKAGE = 20; // CONSTANT_Package
30  
31      /**
32       * The base value for all CONSTANT_MethodHandle constant pool items. Internally, there are 9 variations of
33       * CONSTANT_MethodHandle items, which are stored into 9 different items, of types 21 to 29.
34       */
35      int HANDLE_BASE = 20;
36  
37      /**
38       * The type of BootstrapMethod items. These items are stored in a special class attribute named "BootstrapMethods"
39       * and not in the constant pool.
40       */
41      int BSM = 33;
42  }