public class SingleTypeState 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 AnalysisType |
type |
| Modifier | Constructor and Description |
|---|---|
|
SingleTypeState(PointsToAnalysis bb,
boolean canBeNull,
AnalysisType type)
Creates a new type state from incoming objects.
|
protected |
SingleTypeState(PointsToAnalysis bb,
boolean canBeNull,
SingleTypeState 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 stateCanBeNull) |
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.
|
protected Iterator<AnalysisObject> |
objectsIterator(AnalysisType t)
Provides an iterator for the objects corresponding to the type.
|
Iterator<AnalysisObject> |
objectsIterator(BigBang bb) |
protected static <T> Iterator<T> |
singletonIterator(T object) |
String |
toString() |
int |
typesCount()
Get the number of types.
|
protected 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 AnalysisType type
protected final boolean canBeNull
protected boolean merged
public SingleTypeState(PointsToAnalysis bb, boolean canBeNull, AnalysisType type)
protected SingleTypeState(PointsToAnalysis bb, boolean canBeNull, SingleTypeState other)
public final int typesCount()
TypeStatetypesCount in class TypeStatepublic int objectsCount()
TypeStateobjectsCount in class TypeStatepublic final AnalysisType exactType()
TypeStatepublic final boolean containsType(AnalysisType exactType)
TypeStatecontainsType in class TypeStateprotected final Iterator<AnalysisType> typesIterator(BigBang bb)
TypeStatetypesIterator in class TypeStatepublic Iterator<AnalysisObject> objectsIterator(BigBang bb)
objectsIterator in class TypeStateprotected Iterator<AnalysisObject> objectsIterator(AnalysisType t)
TypeStateobjectsIterator in class TypeStateprotected static <T> Iterator<T> singletonIterator(T object)
public TypeState forCanBeNull(PointsToAnalysis bb, boolean stateCanBeNull)
forCanBeNull in class TypeStatepublic void noteMerge(PointsToAnalysis bb)