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