public abstract class TypeFlow<T> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected AnalysisContext |
context |
protected AnalysisType |
declaredType |
protected MethodFlowsGraph |
graphRef |
protected int |
id |
boolean |
inQueue |
protected static AtomicInteger |
nextId |
protected T |
source |
protected boolean |
usedAsAParameter
True if this flow is passed as a parameter to a call.
|
protected boolean |
usedAsAReceiver
True if this flow is the receiver of a virtual call.
|
| Constructor and Description |
|---|
TypeFlow() |
TypeFlow(T source,
AnalysisType declaredType) |
TypeFlow(T source,
AnalysisType declaredType,
TypeState state) |
TypeFlow(TypeFlow<T> original,
MethodFlowsGraph graphRef)
Shallow copy constructor.
|
TypeFlow(TypeState typeState) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInput(TypeFlow<?> input) |
void |
addObservee(TypeFlow<?> observee) |
void |
addObserver(BigBang bb,
TypeFlow<?> observer)
Register object that will be notified when the state of this flow changes.
|
boolean |
addOriginalObserver(BigBang bb,
TypeFlow<?> observer)
Adds an observer, if not already present, without triggering update.
|
boolean |
addOriginalUse(BigBang bb,
TypeFlow<?> use)
Adds a use, if not already present, without propagating state.
|
boolean |
addState(BigBang bb,
TypeState add) |
boolean |
addState(BigBang bb,
TypeState add,
boolean postFlow) |
boolean |
addUse(BigBang bb,
TypeFlow<?> use) |
void |
clearUses() |
AnalysisContext |
context() |
TypeFlow<T> |
copy(BigBang bb,
MethodFlowsGraph methodFlows)
By default a type flow is not cloneable.
|
protected boolean |
doAddObserver(BigBang bb,
TypeFlow<?> observer,
boolean registerObservees) |
protected boolean |
doAddUse(BigBang bb,
TypeFlow<?> use,
boolean registerInput) |
boolean |
equals(Object other) |
TypeState |
filter(BigBang bb,
TypeState newState) |
AnalysisType |
getDeclaredType() |
Collection<TypeFlow<?>> |
getInputs() |
Collection<TypeFlow<?>> |
getObservees() |
Collection<TypeFlow<?>> |
getObservers() |
int |
getSlot() |
T |
getSource() |
TypeState |
getState() |
Collection<TypeFlow<?>> |
getUses() |
MethodFlowsGraph |
graphRef() |
int |
hashCode() |
int |
id() |
void |
initClone(BigBang bb)
Initialization code for some clone corner case type flows.
|
boolean |
isAllInstantiated() |
boolean |
isClone() |
boolean |
isCloseToAllInstantiated(BigBang bb) |
boolean |
isUsedAsAParameter() |
boolean |
isUsedAsAReceiver() |
AnalysisMethod |
method() |
protected void |
notifyObservers(BigBang bb)
Let the observers that the state has changed.
|
void |
onObservedUpdate(BigBang bb)
Notify the observer that the observed type flow state has changed.
|
TypeFlow<?> |
receiver()
Some flow have a reciver (e.g., loads, store and invokes).
|
boolean |
removeInput(TypeFlow<?> input) |
boolean |
removeObservee(TypeFlow<?> observee) |
boolean |
removeObserver(TypeFlow<?> observer) |
boolean |
removeUse(TypeFlow<?> use) |
void |
setSlot(int slot) |
void |
setState(BigBang bb,
TypeState state) |
void |
setUsedAsAParameter(boolean usedAsAParameter) |
void |
setUsedAsAReceiver(boolean usedAsAReceiver) |
String |
toString() |
void |
update(BigBang bb) |
protected static final AtomicInteger nextId
protected final int id
protected final T source
protected final AnalysisType declaredType
protected final MethodFlowsGraph graphRef
protected final AnalysisContext context
protected boolean usedAsAParameter
protected boolean usedAsAReceiver
public volatile boolean inQueue
public TypeFlow()
public TypeFlow(TypeState typeState)
public TypeFlow(T source, AnalysisType declaredType)
public TypeFlow(T source, AnalysisType declaredType, TypeState state)
public TypeFlow(TypeFlow<T> original, MethodFlowsGraph graphRef)
original - the original flowgraphRef - the holder method clonepublic TypeFlow<T> copy(BigBang bb, MethodFlowsGraph methodFlows)
bb - methodFlows - public void initClone(BigBang bb)
bb - public void setUsedAsAParameter(boolean usedAsAParameter)
public boolean isUsedAsAParameter()
public void setUsedAsAReceiver(boolean usedAsAReceiver)
public boolean isUsedAsAReceiver()
public TypeFlow<?> receiver()
public int id()
public AnalysisContext context()
public MethodFlowsGraph graphRef()
public AnalysisMethod method()
public T getSource()
public boolean isClone()
public AnalysisType getDeclaredType()
public TypeState getState()
public boolean isAllInstantiated()
public boolean isCloseToAllInstantiated(BigBang bb)
public void setSlot(int slot)
public int getSlot()
public boolean addOriginalUse(BigBang bb, TypeFlow<?> use)
public Collection<TypeFlow<?>> getUses()
public boolean removeUse(TypeFlow<?> use)
public void clearUses()
public boolean addOriginalObserver(BigBang bb, TypeFlow<?> observer)
public void addObserver(BigBang bb, TypeFlow<?> observer)
protected boolean doAddObserver(BigBang bb, TypeFlow<?> observer, boolean registerObservees)
public boolean removeObserver(TypeFlow<?> observer)
public Collection<TypeFlow<?>> getObservers()
protected void notifyObservers(BigBang bb)
public void addObservee(TypeFlow<?> observee)
public Collection<TypeFlow<?>> getObservees()
public boolean removeObservee(TypeFlow<?> observee)
public void addInput(TypeFlow<?> input)
public Collection<TypeFlow<?>> getInputs()
public boolean removeInput(TypeFlow<?> input)
public void update(BigBang bb)
public void onObservedUpdate(BigBang bb)