public class MultiTypeState extends TypeState
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
canBeNull
Can this type state represent the null value?
|
protected boolean |
merged
Has this type state been merged with the all-instantiated type state?
|
protected BitSet |
typesBitSet
Keep a bit set for types to easily answer queries like contains type or types count, and
quickly iterate over the types.
|
protected int |
typesCount
Cache the number of types since BitSet.cardinality() computes it every time is called.
|
| Modifier | Constructor and Description |
|---|---|
|
MultiTypeState(PointsToAnalysis bb,
boolean canBeNull,
BitSet typesBitSet,
int typesCount)
Creates a new type state using the provided types bit set and objects.
|
protected |
MultiTypeState(PointsToAnalysis bb,
boolean canBeNull,
MultiTypeState other)
Create a type state with the same content and a reversed canBeNull value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBeNull() |
boolean |
containsType(AnalysisType exactType)
Returns true if this type state contains the type, otherwise it returns false.
|
boolean |
equals(Object o) |
AnalysisType |
exactType()
If this type state has a single, exact type it returns that type, otherwise it returns null.
|
TypeState |
forCanBeNull(PointsToAnalysis bb,
boolean resultCanBeNull) |
int |
hashCode() |
boolean |
isMerged() |
void |
noteMerge(PointsToAnalysis bb)
Note that the objects of this type state have been merged.
|
int |
objectsCount()
Get the number of objects.
|
Iterator<AnalysisObject> |
objectsIterator(AnalysisType exactType)
Provides an iterator for the objects corresponding to the type.
|
protected Iterator<AnalysisObject> |
objectsIterator(BigBang bb) |
String |
toString() |
protected BitSet |
typesBitSet() |
int |
typesCount()
Get the number of types.
|
Iterator<AnalysisType> |
typesIterator(BigBang bb)
Provides an iterator over the types.
|
asConstant, forConstant, forEmpty, forExactType, forExactType, forIntersection, forNonNull, forNonNullObject, forNull, forSubtraction, forType, forType, forUnion, isAllocation, isEmpty, isNull, objects, objects, types, typesStream, verifyDeclaredTypeprotected final BitSet typesBitSet
protected final int typesCount
protected final boolean canBeNull
protected boolean merged
public MultiTypeState(PointsToAnalysis bb, boolean canBeNull, BitSet typesBitSet, int typesCount)
protected MultiTypeState(PointsToAnalysis bb, boolean canBeNull, MultiTypeState other)
public int objectsCount()
objectsCount in class TypeStatepublic AnalysisType exactType()
TypeStatepublic int typesCount()
TypeStatetypesCount in class TypeStateprotected BitSet typesBitSet()
public final Iterator<AnalysisType> typesIterator(BigBang bb)
TypeStatetypesIterator in class TypeStateprotected Iterator<AnalysisObject> objectsIterator(BigBang bb)
objectsIterator in class TypeStatepublic Iterator<AnalysisObject> objectsIterator(AnalysisType exactType)
TypeStateobjectsIterator in class TypeStatepublic final boolean containsType(AnalysisType exactType)
TypeStatecontainsType in class TypeStatepublic TypeState forCanBeNull(PointsToAnalysis bb, boolean resultCanBeNull)
forCanBeNull in class TypeStatepublic void noteMerge(PointsToAnalysis bb)