soot
Class AbstractUnitBox

java.lang.Object
  |
  +--soot.AbstractUnitBox
All Implemented Interfaces:
UnitBox
Direct Known Subclasses:
StmtBox

public abstract class AbstractUnitBox
extends java.lang.Object
implements UnitBox

Reference implementation for UnitBox; just add a canContainUnit method.


Constructor Summary
AbstractUnitBox()
           
 
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.
 void setUnit(Unit unit)
          Sets this box to contain the given unit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractUnitBox

public AbstractUnitBox()
Method Detail

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

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