Package soot.jimple.spark.sets
Class EmptyPointsToSet
- java.lang.Object
-
- soot.jimple.spark.sets.PointsToSetInternal
-
- 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
Constructors Constructor Description EmptyPointsToSet(Singletons.Global g)EmptyPointsToSet(Singletons.Global g, Type type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Node n)Adds n to this set, returns true if n was not already in this set.booleanaddAll(PointsToSetInternal other, PointsToSetInternal exclude)Adds contents of other into this set, returns true if this set changed.booleancontains(Node n)Returns true iff the set contains n.booleanforall(P2SetVisitor v)Calls v's visit method on all nodes in this set.booleanhasNonEmptyIntersection(PointsToSet other)Returns true if this set shares some objects with other.booleanisEmpty()Returns true if this set contains no run-time objects.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.Set<String>possibleStringConstants()If this points-to set consists entirely of string constants, returns a set of these constant strings.Set<Type>possibleTypes()Set of all possible run-time types of objects in the set.StringtoString()static EmptyPointsToSetv()-
Methods inherited from class soot.jimple.spark.sets.PointsToSetInternal
flushNew, getBitMask, getNewSet, getOldSet, getType, mergeWith, pointsToSetEquals, pointsToSetHashCode, setType, size, unFlushNew
-
-
-
-
Constructor Detail
-
EmptyPointsToSet
public EmptyPointsToSet(Singletons.Global g)
-
EmptyPointsToSet
public EmptyPointsToSet(Singletons.Global g, Type type)
-
-
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:
hasNonEmptyIntersectionin interfacePointsToSet- Overrides:
hasNonEmptyIntersectionin classPointsToSetInternal
-
possibleTypes
public Set<Type> possibleTypes()
Set of all possible run-time types of objects in the set.- Specified by:
possibleTypesin interfacePointsToSet- Overrides:
possibleTypesin classPointsToSetInternal
-
addAll
public boolean addAll(PointsToSetInternal other, PointsToSetInternal exclude)
Adds contents of other into this set, returns true if this set changed.- Overrides:
addAllin classPointsToSetInternal
-
forall
public boolean forall(P2SetVisitor v)
Calls v's visit method on all nodes in this set.- Specified by:
forallin classPointsToSetInternal
-
add
public boolean add(Node n)
Adds n to this set, returns true if n was not already in this set.- Specified by:
addin classPointsToSetInternal
-
contains
public boolean contains(Node n)
Returns true iff the set contains n.- Specified by:
containsin classPointsToSetInternal
-
possibleStringConstants
public Set<String> possibleStringConstants()
Description copied from interface:PointsToSetIf 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:
possibleStringConstantsin interfacePointsToSet- Overrides:
possibleStringConstantsin classPointsToSetInternal
-
possibleClassConstants
public Set<ClassConstant> possibleClassConstants()
Description copied from interface:PointsToSetIf 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:
possibleClassConstantsin interfacePointsToSet- Overrides:
possibleClassConstantsin classPointsToSetInternal
-
toString
public String toString()
- Overrides:
toStringin classPointsToSetInternal
-
-