Package soot
Class AbstractUnit
- java.lang.Object
-
- soot.tagkit.AbstractHost
-
- soot.AbstractUnit
-
- All Implemented Interfaces:
Serializable,Context,Host,Unit,Switchable
- Direct Known Subclasses:
AbstractInst,AbstractStmt,ASTNode,DVariableDeclarationStmt
public abstract class AbstractUnit extends AbstractHost implements Unit
Provides default implementations for the methods in Unit.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<UnitBox>boxesPointingToThisList of UnitBoxes pointing to this Unit.-
Fields inherited from class soot.tagkit.AbstractHost
col, line, mTagList
-
-
Constructor Summary
Constructors Constructor Description AbstractUnit()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddBoxPointingToThis(UnitBox b)Adds a box to the list returned by getBoxesPointingToThis.voidapply(Switch sw)Used to implement the Switchable construct.voidclearUnitBoxes()Clears any pointers to and from this Unit's UnitBoxes.abstract Objectclone()Returns a deep clone of this object.List<UnitBox>getBoxesPointingToThis()Returns a list of Boxes pointing to this Unit.List<ValueBox>getDefBoxes()Returns a list of Boxes containing Values defined in this Unit.List<UnitBox>getUnitBoxes()Returns a list of Boxes containing Units defined in this Unit; typically branch targets.List<ValueBox>getUseAndDefBoxes()Returns a list of ValueBoxes, either used or defined in this Unit.List<ValueBox>getUseBoxes()Returns a list of Boxes containing Values used in this Unit.voidredirectJumpsToThisTo(Unit newLocation)Redirects jumps to this Unit to newLocation.voidremoveBoxPointingToThis(UnitBox b)Removes a box from the list returned by getBoxesPointingToThis.-
Methods inherited from class soot.tagkit.AbstractHost
addAllTagsOf, addTag, getJavaSourceStartColumnNumber, getJavaSourceStartLineNumber, getTag, getTags, hasTag, removeAllTags, removeTag
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface soot.tagkit.Host
addAllTagsOf, addTag, getJavaSourceStartColumnNumber, getJavaSourceStartLineNumber, getTag, getTags, hasTag, removeAllTags, removeTag
-
Methods inherited from interface soot.Unit
branches, fallsThrough, toString
-
-
-
-
Method Detail
-
clone
public abstract Object clone()
Returns a deep clone of this object.
-
getUseBoxes
public List<ValueBox> getUseBoxes()
Returns a list of Boxes containing Values used in this Unit. The list of boxes is dynamically updated as the structure changes. Note that they are returned in usual evaluation order. (this is important for aggregation)- Specified by:
getUseBoxesin interfaceUnit
-
getDefBoxes
public List<ValueBox> getDefBoxes()
Returns a list of Boxes containing Values defined in this Unit. The list of boxes is dynamically updated as the structure changes.- Specified by:
getDefBoxesin interfaceUnit
-
getUnitBoxes
public List<UnitBox> getUnitBoxes()
Returns a list of Boxes containing Units defined in this Unit; typically branch targets. The list of boxes is dynamically updated as the structure changes.- Specified by:
getUnitBoxesin interfaceUnit
-
getBoxesPointingToThis
public List<UnitBox> getBoxesPointingToThis()
Returns a list of Boxes pointing to this Unit.- Specified by:
getBoxesPointingToThisin interfaceUnit
-
addBoxPointingToThis
public void addBoxPointingToThis(UnitBox b)
Description copied from interface:UnitAdds a box to the list returned by getBoxesPointingToThis.- Specified by:
addBoxPointingToThisin interfaceUnit
-
removeBoxPointingToThis
public void removeBoxPointingToThis(UnitBox b)
Description copied from interface:UnitRemoves a box from the list returned by getBoxesPointingToThis.- Specified by:
removeBoxPointingToThisin interfaceUnit
-
clearUnitBoxes
public void clearUnitBoxes()
Description copied from interface:UnitClears any pointers to and from this Unit's UnitBoxes.- Specified by:
clearUnitBoxesin interfaceUnit
-
getUseAndDefBoxes
public List<ValueBox> getUseAndDefBoxes()
Returns a list of ValueBoxes, either used or defined in this Unit.- Specified by:
getUseAndDefBoxesin interfaceUnit
-
apply
public void apply(Switch sw)
Used to implement the Switchable construct.- Specified by:
applyin interfaceSwitchable
-
redirectJumpsToThisTo
public void redirectJumpsToThisTo(Unit newLocation)
Description copied from interface:UnitRedirects jumps to this Unit to newLocation. In general, you shouldn't have to use this directly.- Specified by:
redirectJumpsToThisToin interfaceUnit- See Also:
PatchingChain.getNonPatchingChain(),soot.shimple.Shimple#redirectToPreds(Chain, Unit),Shimple.redirectPointers(Unit, Unit)
-
-