Next: Method Attributes, Previous: Class Attributes, Up: Encoding of BML in Class File Format
BML-related field attributes are added as additional attributes to regular fields in the fields table (see Fields Data Structure). They describe properties of the particular field they are attached to. The attributes are as follows:
The FieldModifiers attribute contains the BML related modifiers of the field. It has the following structure:
FieldModifiers_attribute { u2 attribute_name_index; u4 attribute_length; u4 BML_flags; }
The meaning of the fields is as follows:
BML_NON_NULL
, BML_NULLABLE
, BML_SPEC_PUBLIC
,
BML_SPEC_PROTECTED
, BML_PEER
, BML_REP
,
BML_READONLY
, BML_ELEM_PEER
, BML_ELEM_READONLY
. All other flags must be cleared. Only one of
BML_NON_NULL
, BML_NULLABLE
can be set. Only one of
BML_SPEC_PUBLIC
, BML_SPEC_PROTECTED
can be set. Only one
of BML_PEER
, BML_REP
, BML_READONLY
can be set..
Only one of BML_ELEM_PEER
, BML_ELEM_READONLY
can be set only if
one of BML_PEER
, BML_REP
, BML_READONLY
is set and
the field is an array.