public abstract class PointsToSetInternal extends java.lang.Object implements PointsToSet, EqualsSupportingPointsToSet
Modifier and Type | Class and Description |
---|---|
static class |
PointsToSetInternal.P2SetVisitorDefaultTrue
A P2SetVisitor with a default return value of
true . |
static class |
PointsToSetInternal.P2SetVisitorInt
A P2SetVisitor with an int value.
|
Constructor and Description |
---|
PointsToSetInternal(Type type) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
add(Node n)
Adds n to this set, returns true if n was not already in this set.
|
boolean |
addAll(PointsToSetInternal other,
PointsToSetInternal exclude)
Adds contents of other minus the contents of exclude into this set;
returns true if this set changed.
|
abstract boolean |
contains(Node n)
Returns true iff the set contains n.
|
void |
flushNew()
Sets all newly-added nodes to old nodes.
|
abstract boolean |
forall(P2SetVisitor v)
Calls v's visit method on all nodes in this set.
|
protected BitVector |
getBitMask(PointsToSetInternal other,
PAG pag) |
PointsToSetInternal |
getNewSet()
Returns set of newly-added nodes since last call to flushNew.
|
PointsToSetInternal |
getOldSet()
Returns set of nodes already present before last call to flushNew.
|
Type |
getType() |
boolean |
hasNonEmptyIntersection(PointsToSet other)
Returns true if this set shares some objects with other.
|
void |
mergeWith(PointsToSetInternal other)
Merges other into this set.
|
boolean |
pointsToSetEquals(java.lang.Object other)
Returns
true if and only if other holds the same alloc nodes as this. |
int |
pointsToSetHashCode()
Computes a hash code based on the contents of the points-to set.
|
java.util.Set<ClassConstant> |
possibleClassConstants()
If this points-to set consists entirely of objects of
type java.lang.Class of a known class,
returns a set of ClassConstant's that are these classes.
|
java.util.Set<java.lang.String> |
possibleStringConstants()
If this points-to set consists entirely of string constants,
returns a set of these constant strings.
|
java.util.Set<Type> |
possibleTypes()
Set of all possible run-time types of objects in the set.
|
void |
setType(Type type) |
int |
size() |
java.lang.String |
toString() |
void |
unFlushNew()
Sets all nodes to newly-added nodes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isEmpty
protected Type type
public PointsToSetInternal(Type type)
public boolean addAll(PointsToSetInternal other, PointsToSetInternal exclude)
public abstract boolean forall(P2SetVisitor v)
public abstract boolean add(Node n)
public PointsToSetInternal getNewSet()
public PointsToSetInternal getOldSet()
public void flushNew()
public void unFlushNew()
public void mergeWith(PointsToSetInternal other)
public abstract boolean contains(Node n)
public boolean hasNonEmptyIntersection(PointsToSet other)
PointsToSet
hasNonEmptyIntersection
in interface PointsToSet
public java.util.Set<Type> possibleTypes()
PointsToSet
possibleTypes
in interface PointsToSet
public Type getType()
public void setType(Type type)
public int size()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Set<java.lang.String> possibleStringConstants()
PointsToSet
possibleStringConstants
in interface PointsToSet
public java.util.Set<ClassConstant> possibleClassConstants()
PointsToSet
possibleClassConstants
in interface PointsToSet
protected BitVector getBitMask(PointsToSetInternal other, PAG pag)
public int pointsToSetHashCode()
pointsToSetHashCode
in interface EqualsSupportingPointsToSet
public boolean pointsToSetEquals(java.lang.Object other)
true
if and only if other holds the same alloc nodes as this.
Note that equals() is not overwritten on purpose.
This is because Spark relies on comparison by object identity.pointsToSetEquals
in interface EqualsSupportingPointsToSet