Class BitwiseFlagSystem<T>
java.lang.Object
soot.jimple.infoflow.android.axml.flags.BitwiseFlagSystem<T>
- Type Parameters:
T- the keys used to distinguish flags
In some cases, bitmasks might be used in a way where there is a precendence
of certain masks to save space. For "normal" bitmasks, the traditional way of
checking is much faster.
Simple Example: Option A (can be used alone or in combination with others):
01 Option B (cannot be used with option A): 10 Option C (only valid when used
with Option A): 11
In this case, we could do checking of B via ((v & 10) == 1) && ((v & 1) != 1)
but sometimes there are a lot of options (e.g. inputType)
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BitwiseFlagSystem
public BitwiseFlagSystem()
-
-
Method Details
-
register
Associate the given key with the bits set in set bits. The first registration wins.- Parameters:
key- the keysetBits- the bits set
-
getFlags
Returns all matching flags- Parameters:
value- input value
-
isSet
Checks whether all the given flags are set- Parameters:
inputValue- input valueflag- the flags to check
-