soot
Class AbstractUnitBox
java.lang.Object
|
+--soot.AbstractUnitBox
- Direct Known Subclasses:
- StmtBox
- public abstract class AbstractUnitBox
- extends java.lang.Object
- implements UnitBox
Reference implementation for UnitBox; just
add a canContainUnit method.
- See Also:
- Serialized Form
Field Summary |
protected boolean |
branchTarget
Assumes common case (true) by default. |
protected Unit |
unit
|
Method Summary |
abstract boolean |
canContainUnit(Unit u)
Returns true if this box can contain the given Unit. |
Unit |
getUnit()
Returns the unit contained within this box. |
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 |
setBranchTarget(boolean branchTarget)
If not set, this is normally assumed to be true by default. |
void |
setUnit(Unit unit)
Sets this box to contain the given unit. |
void |
toString(UnitPrinter up)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
unit
protected Unit unit
branchTarget
protected boolean branchTarget
- Assumes common case (true) by default.
AbstractUnitBox
public AbstractUnitBox()
canContainUnit
public abstract boolean canContainUnit(Unit u)
- Description copied from interface: UnitBox
- Returns true if this box can contain the given Unit.
- Specified by:
- canContainUnit in interface UnitBox
setBranchTarget
public void setBranchTarget(boolean branchTarget)
- Description copied from interface: UnitBox
- If not set, this is normally assumed to be true by default.
- Specified by:
- setBranchTarget in interface UnitBox
- Tags copied from interface: UnitBox
- See Also:
UnitBox.isBranchTarget()
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).
Returns false if the UnitBox is holding a Unit that indicates
the end of a CFG block (used by SSA to locate CFG
predecessors).
- Specified by:
- isBranchTarget in interface UnitBox
setUnit
public void setUnit(Unit unit)
- Description copied from interface: UnitBox
- Sets this box to contain the given unit. Subject to canContainValue() checks.
- Specified by:
- setUnit in interface UnitBox
getUnit
public Unit getUnit()
- Description copied from interface: UnitBox
- Returns the unit contained within this box.
- Specified by:
- getUnit in interface UnitBox
toString
public void toString(UnitPrinter up)
- Specified by:
- toString in interface UnitBox