Next: Class Attributes, Previous: Combined Constant Pool, Up: Encoding of BML in Class File Format
BML modifiers (see Modifiers) are encoded in suitable attributes
using binary JVM access_flags
and BML_flags
fields. The
bit values of BML_flags
and their summary meaning is given in the
following table:
BML_SPEC_PUBLIC = 0x00000001
ACC_PUBLIC
JVM flag
BML_SPEC_PROTECTED = 0x00000004
ACC_PROTECTED
JVM flag
BML_NON_NULL = 0x00000020
null
BML_NULLABLE = 0x00000040
null
BML_PURE = 0x00000080
BML_HELPER = 0x00000100
BML_PEER = 0x00000400
BML_REP = 0x00000800
BML_READONLY = 0x00001000
BML_ELEM_PEER = 0x00002000
BML_ELEM_READONLY = 0x00002000
Note that for a given feature (field, method result, method's
parameter, local variable etc.)
at most one of SPEC_PUBLIC
, SPEC_PROTECTED
can be set
(when applicable),
at most
one of BML_NON_NULL
and BML_NULLABLE
(when applicable),
at most
one of BML_PEER
, BML_REP
, BML_READONLY
(when applicable),
and at most one of BML_ELEM_PEER
and BML_ELEM_READONLY
(when applicable). Further, BML_ELEM_PEER
and
BML_ELEM_READONLY
can only be set when one of BML_PEER
,
BML_REP
or BML_READONLY
is set, and the feature is of
type array.