S
- the Store
used to keep track of intermediate resultspublic class RegularTransferResult<A extends AbstractValue<A>,S extends Store<S>> extends TransferResult<A,S>
TransferResult
with just one non-exceptional store. The result of
getThenStore
and getElseStore
is equal to the only underlying store.Modifier and Type | Field and Description |
---|---|
protected S |
store
The regular result store.
|
exceptionalStores, resultValue
Constructor and Description |
---|
RegularTransferResult(A value,
S resultStore) |
RegularTransferResult(A value,
S resultStore,
boolean storeChanged)
*
|
RegularTransferResult(A value,
S resultStore,
Map<TypeMirror,S> exceptionalStores) |
RegularTransferResult(A value,
S resultStore,
@Nullable Map<TypeMirror,S> exceptionalStores,
boolean storeChanged)
Create a
TransferResult with resultStore as the resulting store. |
Modifier and Type | Method and Description |
---|---|
boolean |
containsTwoStores() |
S |
getElseStore() |
S |
getRegularStore()
The regular result store.
|
S |
getThenStore() |
boolean |
storeChanged() |
String |
toString() |
getExceptionalStore, getExceptionalStores, getResultValue, setResultValue
public RegularTransferResult(A value, S resultStore, boolean storeChanged)
Exceptions: If the corresponding Node
throws an exception, then it is assumed that no
special handling is necessary and the store before the corresponding Node
will be passed along any exceptional edge.
Aliasing: resultStore
is not allowed to be used anywhere outside of this
class (including use through aliases). Complete control over the object is transfered to this
class.
public RegularTransferResult(A value, S resultStore, Map<TypeMirror,S> exceptionalStores)
public RegularTransferResult(A value, S resultStore, @Nullable Map<TypeMirror,S> exceptionalStores, boolean storeChanged)
TransferResult
with resultStore
as the resulting store. If the
corresponding Node
is a boolean node, then
resultStore
is used for both the 'then' and 'else' edge.
For the meaning of storeChanged, see TransferResult.storeChanged()
.
Exceptions: If the corresponding Node
throws an exception, then the corresponding
store in exceptionalStores
is used. If no exception is found in exceptionalStores
, then it is assumed that no special handling is necessary and the store
before the corresponding Node
will be passed
along any exceptional edge.
Aliasing: resultStore
and any store in exceptionalStores
are not
allowed to be used anywhere outside of this class (including use through aliases). Complete
control over the objects is transfered to this class.
public S getRegularStore()
getRegularStore
in class TransferResult<A extends AbstractValue<A>,S extends Store<S>>
Node
corresponding to this transfer function
result.public S getThenStore()
getThenStore
in class TransferResult<A extends AbstractValue<A>,S extends Store<S>>
Node
this result belongs to evaluates to true
.public S getElseStore()
getElseStore
in class TransferResult<A extends AbstractValue<A>,S extends Store<S>>
Node
this result belongs to evaluates to false
.public boolean containsTwoStores()
containsTwoStores
in class TransferResult<A extends AbstractValue<A>,S extends Store<S>>
true
if and only if this transfer result contains two stores that are
potentially not equal. Note that the result true
does not imply that getRegularStore
cannot be called (or vice versa for false
). Rather, it indicates
that getThenStore
or getElseStore
can be used to give more precise
results. Otherwise, if the result is false
, then all three methods getRegularStore
, getThenStore
, and getElseStore
return equivalent
stores.public boolean storeChanged()
storeChanged
in class TransferResult<A extends AbstractValue<A>,S extends Store<S>>
true
if and only if the transfer function returning this transfer result
changed the regularStore, elseStore, or thenStore.TransferResult.storeChanged()