jawa.util.flags module

class jawa.util.flags.Flags(binary_format, flags)[source]

Bases: object

Convenience class for handling bit flags.

get(name)[source]

Returns the value of the field name.

pack()[source]

A shortcut for struct.pack(flag.binary_format, flag.value).

set(name, value)[source]

Sets the value of the field name to value, which is True or False.

to_dict()[source]

Returns this Flags object’s fields as a dictionary.

unpack(source)[source]

A shortcut for struct.unpack(flag.binary_format, <bytes>).

value

The numeric value of the bitfield.