Next: ModelField Attribute, Previous: ClassModifiers Attribute, Up: Class Attributes
This attribute contains information about a class's ghost fields. The format of the attribute is as follows:
GhostField_attribute { u2 attribute_name_index; u4 attribute_length; u2 fields_count; { u2 access_flags; u4 BML_flags; u2 name_index; u2 descriptor_index; } fields[fields_count]; }
The meaning of the fields:
ACC_PUBLIC
, ACC_PROTECTED
,
ACC_PRIVATE
, ACC_FINAL
and ACC_STATIC
. Only one of ACC_PUBLIC
, ACC_PROTECTED
,
ACC_PRIVATE
can be set.
BML_NON_NULL
,
BML_NULLABLE
, BML_PEER
, BML_REP
,
BML_READONLY
. All other flags must be cleared. Only one of BML_NON_NULL
,
BML_NULLABLE
can be set. Only one
of BML_PEER
, BML_REP
, BML_READONLY
can be set.
\TYPE
) is stored
The initial value of a ghost field must be set by a Set instruction in the static initializer (for static ghost fields) and constructors (for instance ghost fields).