soot
Interface UnitBox

All Known Subinterfaces:
SUnitBox
All Known Implementing Classes:
AbstractUnitBox, ValueUnitPair

public interface UnitBox
extends java.io.Serializable

A box which can contain units.

See Also:
Unit

Method Summary
 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 u)
          Sets this box to contain the given unit.
 void toString(UnitPrinter up)
           
 

Method Detail

setUnit

public void setUnit(Unit u)
Sets this box to contain the given unit. Subject to canContainValue() checks.

getUnit

public Unit getUnit()
Returns the unit contained within this box.

canContainUnit

public boolean canContainUnit(Unit u)
Returns true if this box can contain the given Unit.

isBranchTarget

public 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). Returns false if the UnitBox is holding a Unit that indicates the end of a CFG block (used by SSA to locate CFG predecessors).

setBranchTarget

public void setBranchTarget(boolean branchTarget)
If not set, this is normally assumed to be true by default.
See Also:
isBranchTarget()

toString

public void toString(UnitPrinter up)