Bytecode Instrumentation
| 2004 JavaOne
SM
Conference | Session 3042 Copyright Hewlett Packard Co., 2004.
7
The Java Class File – Constant Pool
Header
Constant Pool
Access Flags, this, super
Implemented Interfaces
Fields
Methods
Class Attributes
cp_info {
u1 tag;
u1 info[];
}
CONSTANT_Methodref_info {
u1 tag;
u2 class_index;
u2 name_and_type_index;
}
CONSTANT_NameAndType_info {
u1 tag;
u2 name_index;
u2 descriptor_index;
}
CONSTANT_Utf8_info {
u1 tag;
u2 length;
u1 bytes[length];
}
Constant Type Size (bytes)
Double 9
NameAndType 5
Class 3
Fieldref 5
Methodref 5
InterfaceMethodref 5
String 3
Integer 5
Float 5
Long 9
Utf8 u1 tag;
u2 length;
u1 bytes[length];