soot.shimple.internal
Class SValueUnitPair
java.lang.Object
soot.tagkit.AbstractHost
soot.AbstractValueBox
soot.toolkits.scalar.ValueUnitPair
soot.shimple.internal.SValueUnitPair
- All Implemented Interfaces:
- Serializable, EquivTo, SUnitBox, Host, UnitBox, ValueBox
public class SValueUnitPair
- extends ValueUnitPair
- implements SUnitBox
Extension of ValueUnitPair that implements SUnitBox. Needed by
SPatchingChain. Equality is no longer dependent on the value.
- Author:
- Navindra Umanee
- See Also:
- Serialized Form
Method Summary |
boolean |
isBranchTarget()
Returns true if the UnitBox is holding a Unit that is the
target of a branch (ie a Unit at the beginning of a CFG block). |
boolean |
isUnitChanged()
Indicates whether the contents of the UnitBox may have been
changed. |
void |
setUnit(Unit u)
Sets this box to contain the given unit. |
void |
setUnitChanged(boolean unitChanged)
Updates the value of the flag used to indicate whether the
contents of the UnitBox may have changed. |
unitChanged
protected boolean unitChanged
SValueUnitPair
public SValueUnitPair(Value value,
Unit unit)
isBranchTarget
public boolean isBranchTarget()
- Description copied from interface:
UnitBox
- Returns true if the UnitBox is holding a Unit that is the
target of a branch (ie a Unit at the beginning of a CFG block).
This is the default case.
Returns false if the UnitBox is holding a Unit that
indicates the end of a CFG block and may require specialised
processing for SSA.
- Specified by:
isBranchTarget
in interface UnitBox
- Overrides:
isBranchTarget
in class ValueUnitPair
- See Also:
UnitBox.isBranchTarget()
setUnit
public void setUnit(Unit u)
- Description copied from interface:
UnitBox
- Sets this box to contain the given unit. Subject to canContainValue() checks.
- Specified by:
setUnit
in interface UnitBox
- Overrides:
setUnit
in class ValueUnitPair
- See Also:
UnitBox.setUnit(Unit)
isUnitChanged
public boolean isUnitChanged()
- Description copied from interface:
SUnitBox
- Indicates whether the contents of the UnitBox may have been
changed. Returns true if setUnit(Unit) has been called
recently and was not followed by setUnitChanged(false).
Needed for Shimple internal Unit chain patching.
- Specified by:
isUnitChanged
in interface SUnitBox
- See Also:
SUnitBox.isUnitChanged()
setUnitChanged
public void setUnitChanged(boolean unitChanged)
- Description copied from interface:
SUnitBox
- Updates the value of the flag used to indicate whether the
contents of the UnitBox may have changed.
Needed for Shimple internal Unit chain patching.
- Specified by:
setUnitChanged
in interface SUnitBox
- See Also:
SUnitBox.setUnitChanged(boolean)