public class ValueUnitPair extends AbstractValueBox implements UnitBox, EquivTo
Modifier and Type | Field and Description |
---|---|
protected Unit |
unit |
col, line, mTagList
Constructor and Description |
---|
ValueUnitPair(Value value,
Unit unit)
Constructs a ValueUnitPair from a Unit object and a Value object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canContainUnit(Unit u)
Returns true if this box can contain the given Unit.
|
boolean |
canContainValue(Value value)
Returns true if the given Value fits in this box.
|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object other) |
int |
equivHashCode()
Non-deterministic hashcode consistent with equivTo()
implementation.
|
boolean |
equivTo(java.lang.Object other)
Two ValueUnitPairs are equivTo iff they hold the same
Unit objects and equivalent Value objects within them.
|
Unit |
getUnit()
Returns the unit contained within this box.
|
int |
hashCode() |
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).
|
void |
setUnit(Unit unit)
Sets this box to contain the given unit.
|
java.lang.String |
toString() |
void |
toString(UnitPrinter up) |
getValue, setValue
addAllTagsOf, addTag, getJavaSourceStartColumnNumber, getJavaSourceStartLineNumber, getTag, getTags, hasTag, removeAllTags, removeTag
finalize, getClass, notify, notifyAll, wait, wait, wait
addAllTagsOf, addTag, getJavaSourceStartColumnNumber, getJavaSourceStartLineNumber, getTag, getTags, hasTag, removeAllTags, removeTag
protected Unit unit
public boolean canContainValue(Value value)
ValueBox
canContainValue
in interface ValueBox
public void setUnit(Unit unit)
UnitBox
setUnit
in interface UnitBox
UnitBox.setUnit(Unit)
public Unit getUnit()
UnitBox
getUnit
in interface UnitBox
UnitBox.getUnit()
public boolean canContainUnit(Unit u)
UnitBox
canContainUnit
in interface UnitBox
UnitBox.canContainUnit(Unit)
public boolean isBranchTarget()
UnitBox
Returns false if the UnitBox is holding a Unit that indicates the end of a CFG block and may require specialised processing for SSA.
isBranchTarget
in interface UnitBox
UnitBox.isBranchTarget()
public java.lang.String toString()
toString
in class AbstractValueBox
public void toString(UnitPrinter up)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public boolean equivTo(java.lang.Object other)
public int equivHashCode()
Note: If you are concerned about non-determinism, remember that current implementations of equivHashCode() in other parts of Soot are non-deterministic as well (see Constant.java for example).
equivHashCode
in interface EquivTo
public java.lang.Object clone()
clone
in class java.lang.Object