|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcheckers.flow.GenKillBits<K>
K - the type of the keypublic class GenKillBits<K> extends Object
Maintains multiple gen-kill sets, "keyed" by a value. For instance, the
flow-sensitive inference implemented in Flow uses a
GenKillBits keyed by AnnotationMirrors to simultaneously
track the gen-kill sets of multiple type qualifiers.
This class is essentially an abstraction for maintaining and combining multiple simultaneous bit vectors.
| Constructor and Description |
|---|
GenKillBits(Collection<K> keys)
Creates a new GenKillBits with the specified set of keys. |
GenKillBits(GenKillBits<K> other)
Creates a new GenKillBits that is a deep copy of the
GenKillBits passed as an argument. |
| Modifier and Type | Method and Description | |
|---|---|---|
static void |
andlub(GenKillBits<AnnotationMirror> outarg1,
GenKillBits<AnnotationMirror> arg2,
QualifierHierarchy annoRelations)
Merges each gen-kill set in outarg1 with the one corresponding to the same key in arg2 via boolean "and" on each bit. |
|
void |
clear(K key,
int index)
Clears the bit (kill) for the key at the specified index. |
|
boolean |
contains(K key)
|
|
static
|
copy(GenKillBits<K> other)
Creates a new GenKillBits that is a deep copy of the
GenKillBits passed as an argument. |
|
boolean |
get(K key,
int index)
Retrieves the bit for the key at the specified index. |
|
static void |
orlub(GenKillBits<AnnotationMirror> outarg1,
GenKillBits<AnnotationMirror> arg2,
QualifierHierarchy annoRelations)
Merges each gen-kill set outarg1 with the one corresponding to the same key in arg2 via boolean "or" on each bit. |
|
void |
set(K key,
int index)
Sets the bit (gen) for the key at the specified index. |
|
String |
toString()
|
|
boolean |
valid()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GenKillBits(Collection<K> keys)
GenKillBits with the specified set of keys.
(Once specified, the keys may not be changed.)
keys - the keys for the GenKillBitspublic GenKillBits(GenKillBits<K> other)
GenKillBits that is a deep copy of the
GenKillBits passed as an argument.
other - the GenKillBits to copycopy(GenKillBits)| Method Detail |
|---|
public static <K> GenKillBits<K> copy(GenKillBits<K> other)
GenKillBits that is a deep copy of the
GenKillBits passed as an argument.
K - the key type of the groupother - the GenKillBits to copygGenKillBits(GenKillBits)
public void set(K key,
int index)
key - the key for which the bit should be setindex - the index at which to set the bitIllegalArgumentException - if the key is not one of the keys for
this group
public boolean get(K key,
int index)
key - index - IllegalArgumentException - if the key is not one of the keys for
this grouppublic boolean contains(K key)
public void clear(K key,
int index)
key - the key for which the bit should be setindex - the index at which to set the bitIllegalArgumentException - if the key is not one of the keys for
this grouppublic String toString()
toString in class Object
public static void andlub(GenKillBits<AnnotationMirror> outarg1,
GenKillBits<AnnotationMirror> arg2,
QualifierHierarchy annoRelations)
arg2 via boolean "and" on each bit. Modifies outarg1's
gen-kill set.
TODO: lub
outarg1 - the group to modifyarg2 - the group to "and" withIllegalArgumentException - if the other group is missing a key from
this group
public static void orlub(GenKillBits<AnnotationMirror> outarg1,
GenKillBits<AnnotationMirror> arg2,
QualifierHierarchy annoRelations)
arg2 via boolean "or" on each bit. Modifies outarg1
gen-kill set.
TODO: lub.
outarg1 - the group to modifyarg2 - the group to "or" withIllegalArgumentException - if the other group is missing a key from
this grouppublic boolean valid()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||