soot.jimple.spark.sets
Class PointsToSetInternal

java.lang.Object
  |
  +--soot.jimple.spark.sets.PointsToSetInternal
All Implemented Interfaces:
PointsToSet
Direct Known Subclasses:
BitPointsToSet, DoublePointsToSet, EmptyPointsToSet, HashPointsToSet, HybridPointsToSet, SortedArraySet

public abstract class PointsToSetInternal
extends java.lang.Object
implements PointsToSet

Abstract base class for implementations of points-to sets.


Field Summary
protected  Type type
           
 
Constructor Summary
PointsToSetInternal(Type type)
           
 
Method Summary
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)
           
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.
 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.
 java.util.Set possibleTypes()
          Set of all possible run-time types of objects in the set.
 void setType(Type type)
           
 int size()
           
 void unFlushNew()
          Sets all nodes to newly-added nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface soot.jimple.spark.PointsToSet
isEmpty
 

Field Detail

type

protected Type type
Constructor Detail

PointsToSetInternal

public PointsToSetInternal(Type type)
Method Detail

addAll

public boolean addAll(PointsToSetInternal other,
                      PointsToSetInternal exclude)

forall

public abstract boolean forall(P2SetVisitor v)
Calls v's visit method on all nodes in this set.


add

public abstract boolean add(Node n)
Adds n to this set, returns true if n was not already in this set.


getNewSet

public PointsToSetInternal getNewSet()
Returns set of newly-added nodes since last call to flushNew.


getOldSet

public PointsToSetInternal getOldSet()
Returns set of nodes already present before last call to flushNew.


flushNew

public void flushNew()
Sets all newly-added nodes to old nodes.


unFlushNew

public void unFlushNew()
Sets all nodes to newly-added nodes.


mergeWith

public void mergeWith(PointsToSetInternal other)
Merges other into this set.


contains

public abstract boolean contains(Node n)
Returns true iff the set contains n.


hasNonEmptyIntersection

public boolean hasNonEmptyIntersection(PointsToSet other)
Description copied from interface: PointsToSet
Returns true if this set shares some objects with other.

Specified by:
hasNonEmptyIntersection in interface PointsToSet

possibleTypes

public java.util.Set possibleTypes()
Description copied from interface: PointsToSet
Set of all possible run-time types of objects in the set.

Specified by:
possibleTypes in interface PointsToSet

getType

public Type getType()

setType

public void setType(Type type)

size

public int size()