Each class field is described by a variable-length field_info structure. The
format of this structure is
field_info {
u2 access_flags;
u2 name_index;
u2 descriptor_index;
u2 attributes_count;
attribute_info attributes[attributes_count];
}
The value of the access_flags item is a mask of modifiers used to describe
access permission to and properties of a field.
The value of the name_index item must be a valid index into the constant pool
table. The constant pool entry at that index must be a {@link CONSTANT_Utf8_info}
structure which must represent a valid Java field name stored as a simple (not
fully qualified) name, that is, as a Java identifier.
The value of the descriptor_index item must be a valid index into the constant
pool table. The constant pool entry at that index must be a
{@link CONSTANT_Utf8_info} structure which must represent a valid Java field
descriptor.
Each value of the attributes table must be a variable-length attribute structure.
A field can have any number of attributes associated with it. The only attribute
defined for the attributes table of a field_info structure at the moment
is the ConstantValue attribute -- see {@link ConstantValueAttribute_info}. |