public abstract class TypeState extends Object
| Constructor and Description |
|---|
TypeState() |
| 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.
|
abstract boolean |
canBeNull() |
abstract boolean |
containsType(AnalysisType exactType)
Returns true if this type state contains the type, otherwise it returns false.
|
abstract boolean |
equals(Object o) |
abstract AnalysisType |
exactType()
If this type state has a single, exact type it returns that type, otherwise it returns null.
|
abstract TypeState |
forCanBeNull(PointsToAnalysis bb,
boolean stateCanBeNull) |
static TypeState |
forConstant(PointsToAnalysis bb,
JavaConstant constant,
AnalysisType exactType)
Wraps the analysis object corresponding to a JavaConstant into a non-null type state.
|
static TypeState |
forEmpty() |
static SingleTypeState |
forExactType(PointsToAnalysis bb,
AnalysisObject object,
boolean canBeNull) |
static SingleTypeState |
forExactType(PointsToAnalysis bb,
AnalysisType exactType,
boolean canBeNull) |
static TypeState |
forIntersection(PointsToAnalysis bb,
TypeState s1,
TypeState s2) |
TypeState |
forNonNull(PointsToAnalysis bb) |
static TypeState |
forNonNullObject(PointsToAnalysis bb,
AnalysisObject object)
Wraps an analysis object into a non-null type state.
|
static TypeState |
forNull() |
static TypeState |
forSubtraction(PointsToAnalysis bb,
TypeState s1,
TypeState s2) |
static TypeState |
forType(PointsToAnalysis bb,
AnalysisObject object,
boolean canBeNull) |
static TypeState |
forType(PointsToAnalysis bb,
AnalysisType type,
boolean canBeNull) |
static TypeState |
forUnion(PointsToAnalysis bb,
TypeState s1,
TypeState s2) |
int |
hashCode() |
boolean |
isAllocation() |
boolean |
isEmpty() |
boolean |
isMerged() |
boolean |
isNull() |
void |
noteMerge(PointsToAnalysis bb)
Note that the objects of this type state have been merged.
|
Iterable<AnalysisObject> |
objects(AnalysisType type)
Provides an iterable for the objects corresponding to the type.
|
Iterable<AnalysisObject> |
objects(BigBang bb) |
abstract int |
objectsCount()
Get the number of objects.
|
protected abstract Iterator<AnalysisObject> |
objectsIterator(AnalysisType type)
Provides an iterator for the objects corresponding to the type.
|
protected abstract Iterator<AnalysisObject> |
objectsIterator(BigBang bb) |
Iterable<AnalysisType> |
types(BigBang bb)
Provides an iterable for the types for easy "for-each loop" iteration.
|
abstract int |
typesCount()
Get the number of types.
|
protected abstract Iterator<AnalysisType> |
typesIterator(BigBang bb)
Provides an iterator over the types.
|
Stream<AnalysisType> |
typesStream(BigBang bb)
Provides a stream for the types.
|
boolean |
verifyDeclaredType(BigBang bb,
AnalysisType declaredType) |
public abstract int typesCount()
public abstract AnalysisType exactType()
protected abstract Iterator<AnalysisType> typesIterator(BigBang bb)
public Iterable<AnalysisType> types(BigBang bb)
public Stream<AnalysisType> typesStream(BigBang bb)
public abstract boolean containsType(AnalysisType exactType)
public abstract int objectsCount()
protected abstract Iterator<AnalysisObject> objectsIterator(BigBang bb)
public final Iterable<AnalysisObject> objects(BigBang bb)
protected abstract Iterator<AnalysisObject> objectsIterator(AnalysisType type)
public Iterable<AnalysisObject> objects(AnalysisType type)
public boolean isAllocation()
public JavaConstant asConstant()
TypeState.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().public boolean isEmpty()
public boolean isNull()
public abstract boolean canBeNull()
public void noteMerge(PointsToAnalysis bb)
public boolean isMerged()
public boolean verifyDeclaredType(BigBang bb, AnalysisType declaredType)
public static TypeState forEmpty()
public static TypeState forNull()
public static TypeState forNonNullObject(PointsToAnalysis bb, AnalysisObject object)
public static TypeState forConstant(PointsToAnalysis bb, JavaConstant constant, AnalysisType exactType)
public static SingleTypeState forExactType(PointsToAnalysis bb, AnalysisType exactType, boolean canBeNull)
public static SingleTypeState forExactType(PointsToAnalysis bb, AnalysisObject object, boolean canBeNull)
public static TypeState forType(PointsToAnalysis bb, AnalysisType type, boolean canBeNull)
public static TypeState forType(PointsToAnalysis bb, AnalysisObject object, boolean canBeNull)
public final TypeState forNonNull(PointsToAnalysis bb)
public abstract TypeState forCanBeNull(PointsToAnalysis bb, boolean stateCanBeNull)
public static TypeState forUnion(PointsToAnalysis bb, TypeState s1, TypeState s2)
public static TypeState forIntersection(PointsToAnalysis bb, TypeState s1, TypeState s2)
public static TypeState forSubtraction(PointsToAnalysis bb, TypeState s1, TypeState s2)