public class ContextSensitiveSingleTypeState extends SingleTypeState
| Modifier and Type | Field and Description |
|---|---|
protected AnalysisObject[] |
objects
The objects of this type state.
|
canBeNull, merged, type| Modifier | Constructor and Description |
|---|---|
|
ContextSensitiveSingleTypeState(PointsToAnalysis bb,
boolean canBeNull,
AnalysisType type,
AnalysisObject... objects)
Creates a new type state from incoming objects.
|
protected |
ContextSensitiveSingleTypeState(PointsToAnalysis bb,
boolean canBeNull,
ContextSensitiveSingleTypeState other)
Create a type state with the same content and a reversed canBeNull value.
|
| Modifier and Type | Method and Description |
|---|---|
JavaConstant |
asConstant()
Returns a non-null value when this type state represents a single constant value, or null if
this type state is not a single constant.
|
protected boolean |
checkObjects(BigBang bb) |
boolean |
equals(Object o) |
TypeState |
forCanBeNull(PointsToAnalysis bb,
boolean stateCanBeNull) |
int |
hashCode() |
boolean |
isAllocation() |
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) |
String |
toString() |
canBeNull, containsType, exactType, singletonIterator, typesCount, typesIteratorforConstant, forEmpty, forExactType, forExactType, forIntersection, forNonNull, forNonNullObject, forNull, forSubtraction, forType, forType, forUnion, isEmpty, isNull, objects, objects, types, typesStream, verifyDeclaredTypeprotected final AnalysisObject[] objects
public ContextSensitiveSingleTypeState(PointsToAnalysis bb, boolean canBeNull, AnalysisType type, AnalysisObject... objects)
protected ContextSensitiveSingleTypeState(PointsToAnalysis bb, boolean canBeNull, ContextSensitiveSingleTypeState other)
protected boolean checkObjects(BigBang bb)
public final int objectsCount()
TypeStateobjectsCount in class SingleTypeStatepublic Iterator<AnalysisObject> objectsIterator(BigBang bb)
objectsIterator in class SingleTypeStateprotected Iterator<AnalysisObject> objectsIterator(AnalysisType t)
TypeStateobjectsIterator in class SingleTypeStatepublic TypeState forCanBeNull(PointsToAnalysis bb, boolean stateCanBeNull)
forCanBeNull in class SingleTypeStatepublic void noteMerge(PointsToAnalysis bb)
noteMerge in class SingleTypeStatepublic boolean isMerged()
isMerged in class SingleTypeStatepublic boolean isAllocation()
isAllocation in class TypeStatepublic JavaConstant asConstant()
TypeStateTypeState.canBeNull() flag still applies when a constant is returned. A type
state that is a "constant or null" both returns a non-null result for TypeState.asConstant()}
and true for TypeState.canBeNull().asConstant in class TypeStatepublic int hashCode()
hashCode in class SingleTypeStatepublic boolean equals(Object o)
equals in class SingleTypeStatepublic String toString()
toString in class SingleTypeState