Next: DataGroups Attribute, Previous: RepresentsClause Attribute, Up: Class Attributes
This attribute represents the second constant pool, containing all names and types that appear in the specification part of the class description. It has the following structure:
SecondConstantPool_attribute { u2 attribute_name_index; u4 attribute_length; u2 second_cp_count; cp_info second_cp[second_cp_count]; }
The meaning of the fields is as follows:
The structure of this attribute closely resembles the definition of the JVM constant pool structure. If a JVM constant pool is of size cp_count, then all references #n with n smaller than cp_count are references to the JVM constant pool, and references #n with n greater or equal than cp_count are references to a field in the second constant pool with index n-cp_count. References #n with n greater or equal to cp_count+second_cp_count are invalid. This attribute can occur only once.