soot.jimple.spark.sets
Class EmptyPointsToSet

java.lang.Object
  extended by soot.jimple.spark.sets.PointsToSetInternal
      extended by soot.jimple.spark.sets.EmptyPointsToSet
All Implemented Interfaces:
EqualsSupportingPointsToSet, PointsToSet

public class EmptyPointsToSet
extends PointsToSetInternal

Implementation of an empty, immutable points-to set.

Author:
Ondrej Lhotak

Nested Class Summary
 
Nested classes/interfaces inherited from class soot.jimple.spark.sets.PointsToSetInternal
PointsToSetInternal.P2SetVisitorDefaultTrue, PointsToSetInternal.P2SetVisitorInt
 
Field Summary
 
Fields inherited from class soot.jimple.spark.sets.PointsToSetInternal
type
 
Constructor Summary
EmptyPointsToSet(Singletons.Global g)
           
 
Method Summary
 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 into this set, returns true if this set changed.
 boolean contains(Node n)
          Returns true iff the set contains n.
 boolean forall(P2SetVisitor v)
          Calls v's visit method on all nodes in this set.
 boolean hasNonEmptyIntersection(PointsToSet other)
          Returns true if this set shares some objects with other.
 boolean isEmpty()
          Returns true if this set contains no run-time objects.
 Set 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.
 Set possibleStringConstants()
          If this points-to set consists entirely of string constants, returns a set of these constant strings.
 Set possibleTypes()
          Set of all possible run-time types of objects in the set.
 String toString()
          
static EmptyPointsToSet v()
           
 
Methods inherited from class soot.jimple.spark.sets.PointsToSetInternal
flushNew, getBitMask, getNewSet, getOldSet, getType, mergeWith, pointsToSetEquals, pointsToSetHashCode, setType, size, unFlushNew
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmptyPointsToSet

public EmptyPointsToSet(Singletons.Global g)
Method Detail

v

public static EmptyPointsToSet v()

isEmpty

public boolean isEmpty()
Returns true if this set contains no run-time objects.


hasNonEmptyIntersection

public boolean hasNonEmptyIntersection(PointsToSet other)
Returns true if this set shares some objects with other.

Specified by:
hasNonEmptyIntersection in interface PointsToSet
Overrides:
hasNonEmptyIntersection in class PointsToSetInternal

possibleTypes

public Set possibleTypes()
Set of all possible run-time types of objects in the set.

Specified by:
possibleTypes in interface PointsToSet
Overrides:
possibleTypes in class PointsToSetInternal

addAll

public boolean addAll(PointsToSetInternal other,
                      PointsToSetInternal exclude)
Adds contents of other into this set, returns true if this set changed.

Overrides:
addAll in class PointsToSetInternal

forall

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

Specified by:
forall in class PointsToSetInternal

add

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

Specified by:
add in class PointsToSetInternal

contains

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

Specified by:
contains in class PointsToSetInternal

possibleStringConstants

public Set possibleStringConstants()
Description copied from interface: PointsToSet
If this points-to set consists entirely of string constants, returns a set of these constant strings. If this point-to set may contain something other than constant strings, returns null.

Specified by:
possibleStringConstants in interface PointsToSet
Overrides:
possibleStringConstants in class PointsToSetInternal

possibleClassConstants

public Set possibleClassConstants()
Description copied from interface: PointsToSet
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. If this point-to set may contain something else, returns null.

Specified by:
possibleClassConstants in interface PointsToSet
Overrides:
possibleClassConstants in class PointsToSetInternal

toString

public String toString()

Overrides:
toString in class PointsToSetInternal