edu.umd.cs.findbugs.ba
public final class LockSet extends Object
See Also: ValueNumberAnalysis
Field Summary | |
---|---|
static int | BOTTOM
An invalid lock count resulting from the meet of two
different (inconsistent) lock counts. |
static int | TOP
An uninitialized lock value. |
Constructor Summary | |
---|---|
LockSet()
Constructor.
|
Method Summary | |
---|---|
void | clear()
Clear all entries out of this LockSet. |
boolean | containsReturnValue(ValueNumberFactory factory)
Determine whether or not this lock set contains any
locked values which are method return values.
|
void | copyFrom(LockSet other)
Make this LockSet the same as the given one.
|
int | getLockCount(int valueNumber)
Get the lock count for given lock object.
|
Collection<ValueNumber> | getLockedValueNumbers(ValueNumberFrame frame) |
int | getNumLockedObjects()
Get the number of distinct lock values with positive lock counts. |
void | intersectWith(LockSet other)
Destructively intersect this lock set with another.
|
boolean | isEmpty()
Return whether or not this lock set is empty,
meaning that no locks have a positive lock count.
|
boolean | isTop() |
void | meetWith(LockSet other)
Meet this LockSet with another LockSet,
storing the result in this object.
|
boolean | sameAs(LockSet other)
Return whether or not this LockSet is the same as the one given.
|
void | setDefaultLockCount(int defaultLockCount)
Set the default lock count to return for nonexistent lock entries.
|
void | setLockCount(int valueNumber, int lockCount)
Set the lock count for a lock object.
|
Parameters: factory the ValueNumberFactory that produced the lock values
Parameters: other the LockSet to copy
Parameters: valueNumber value number of the lock object
Returns: the lock count for the lock object
Parameters: frame
Returns: a set of the locked value numbers
Parameters: other the other LockSet
Returns: true if no locks are held, false if at least one lock is held
Parameters: other the other LockSet
Parameters: other the other LockSet
Parameters: defaultLockCount the default lock count value
Parameters: valueNumber value number of the lock object lockCount the lock count for the lock