Package soot
Interface Unit
-
- All Superinterfaces:
Context,Host,Serializable,Switchable
- All Known Subinterfaces:
AddInst,AndInst,ArrayLengthInst,ArrayReadInst,ArrayWriteInst,AssignStmt,BranchableStmt,BreakpointStmt,CmpgInst,CmpInst,CmplInst,DefinitionStmt,DivInst,Dup1_x1Inst,Dup1_x2Inst,Dup1Inst,Dup2_x1Inst,Dup2_x2Inst,Dup2Inst,DupInst,DynamicInvokeInst,EnterMonitorInst,EnterMonitorStmt,ExitMonitorInst,ExitMonitorStmt,FieldArgInst,FieldGetInst,FieldPutInst,GotoInst,GotoStmt,IdentityInst,IdentityStmt,IdentityUnit,IfCmpEqInst,IfCmpGeInst,IfCmpGtInst,IfCmpLeInst,IfCmpLtInst,IfCmpNeInst,IfEqInst,IfGeInst,IfGtInst,IfLeInst,IfLtInst,IfNeInst,IfNonNullInst,IfNullInst,IfStmt,IncInst,Inst,InstanceCastInst,InstanceOfInst,InterfaceInvokeInst,InvokeStmt,JSRInst,LoadInst,LookupSwitchInst,LookupSwitchStmt,MethodArgInst,MonitorStmt,MulInst,NegInst,NewArrayInst,NewInst,NewMultiArrayInst,NoArgInst,NopInst,NopStmt,NopUnit,OpTypeArgInst,OrInst,PopInst,PrimitiveCastInst,PushInst,RemInst,RetInst,RetStmt,ReturnInst,ReturnStmt,ReturnVoidInst,ReturnVoidStmt,ShlInst,ShrInst,SpecialInvokeInst,StaticGetInst,StaticInvokeInst,StaticPutInst,Stmt,StoreInst,SubInst,SwapInst,SwitchInst,SwitchStmt,TableSwitchInst,TableSwitchStmt,TargetArgInst,ThrowInst,ThrowStmt,UshrInst,VirtualInvokeInst,XorInst
- All Known Implementing Classes:
AbstractBranchInst,AbstractDefinitionStmt,AbstractInst,AbstractInvokeInst,AbstractOpStmt,AbstractOpTypeBranchInst,AbstractOpTypeInst,AbstractRefTypeInst,AbstractStmt,AbstractSwitchInst,AbstractSwitchStmt,AbstractUnit,ASTControlFlowNode,ASTDoWhileNode,ASTForLoopNode,ASTIfElseNode,ASTIfNode,ASTLabeledBlockNode,ASTLabeledNode,ASTMethodNode,ASTNode,ASTStatementSequenceNode,ASTSwitchNode,ASTSynchronizedBlockNode,ASTTryNode,ASTUnconditionalLoopNode,ASTWhileNode,BAddInst,BAndInst,BArrayLengthInst,BArrayReadInst,BArrayWriteInst,BCmpgInst,BCmpInst,BCmplInst,BDivInst,BDup1_x1Inst,BDup1_x2Inst,BDup1Inst,BDup2_x1Inst,BDup2_x2Inst,BDup2Inst,BDupInst,BDynamicInvokeInst,BEnterMonitorInst,BExitMonitorInst,BFieldGetInst,BFieldPutInst,BGotoInst,BIdentityInst,BIfCmpEqInst,BIfCmpGeInst,BIfCmpGtInst,BIfCmpLeInst,BIfCmpLtInst,BIfCmpNeInst,BIfEqInst,BIfGeInst,BIfGtInst,BIfLeInst,BIfLtInst,BIfNeInst,BIfNonNullInst,BIfNullInst,BIncInst,BInstanceCastInst,BInstanceOfInst,BInterfaceInvokeInst,BJSRInst,BLoadInst,BLookupSwitchInst,BMulInst,BNegInst,BNewArrayInst,BNewInst,BNewMultiArrayInst,BNopInst,BOrInst,BPopInst,BPrimitiveCastInst,BPushInst,BRemInst,BReturnInst,BReturnVoidInst,BShlInst,BShrInst,BSpecialInvokeInst,BStaticGetInst,BStaticInvokeInst,BStaticPutInst,BStoreInst,BSubInst,BSwapInst,BTableSwitchInst,BThrowInst,BUshrInst,BVirtualInvokeInst,BXorInst,DAbruptStmt,DAssignStmt,DDecrementStmt,DIdentityStmt,DIncrementStmt,DShortcutAssignStmt,DVariableDeclarationStmt,GAssignStmt,GEnterMonitorStmt,GExitMonitorStmt,GIdentityStmt,GIfStmt,GInvokeStmt,GLookupSwitchStmt,GReturnStmt,GTableSwitchStmt,GThrowStmt,JAssignStmt,JBreakpointStmt,JEnterMonitorStmt,JExitMonitorStmt,JGotoStmt,JIdentityStmt,JIfStmt,JInvokeStmt,JLookupSwitchStmt,JNopStmt,JRetStmt,JReturnStmt,JReturnVoidStmt,JTableSwitchStmt,JThrowStmt,PlaceholderInst,PlaceholderStmt
public interface Unit extends Switchable, Host, Serializable, Context
A code fragment (eg Stmt or Inst), used within Body classes. Intermediate representations must use an implementation of Unit for their code. In general, a unit denotes some sort of unit for execution.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddBoxPointingToThis(UnitBox b)Adds a box to the list returned by getBoxesPointingToThis.booleanbranches()Returns true if execution after this statement does not necessarily continue at the following statement.voidclearUnitBoxes()Clears any pointers to and from this Unit's UnitBoxes.Objectclone()booleanfallsThrough()Returns true if execution after this statement may continue at the following statement.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 Boxes containing any Value 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.voidtoString(UnitPrinter up)-
Methods inherited from interface soot.tagkit.Host
addAllTagsOf, addTag, getJavaSourceStartColumnNumber, getJavaSourceStartLineNumber, getTag, getTags, hasTag, removeAllTags, removeTag
-
Methods inherited from interface soot.util.Switchable
apply
-
-
-
-
Method Detail
-
getUseBoxes
List<ValueBox> getUseBoxes()
Returns a list of Boxes containing Values used in this Unit.
-
getDefBoxes
List<ValueBox> getDefBoxes()
Returns a list of Boxes containing Values defined in this Unit.
-
getUnitBoxes
List<UnitBox> getUnitBoxes()
Returns a list of Boxes containing Units defined in this Unit; typically branch targets.
-
getBoxesPointingToThis
List<UnitBox> getBoxesPointingToThis()
Returns a list of Boxes pointing to this Unit.
-
addBoxPointingToThis
void addBoxPointingToThis(UnitBox b)
Adds a box to the list returned by getBoxesPointingToThis.
-
removeBoxPointingToThis
void removeBoxPointingToThis(UnitBox b)
Removes a box from the list returned by getBoxesPointingToThis.
-
clearUnitBoxes
void clearUnitBoxes()
Clears any pointers to and from this Unit's UnitBoxes.
-
getUseAndDefBoxes
List<ValueBox> getUseAndDefBoxes()
Returns a list of Boxes containing any Value either used or defined in this Unit.
-
clone
Object clone()
-
fallsThrough
boolean fallsThrough()
Returns true if execution after this statement may continue at the following statement. GotoStmt will return false but IfStmt will return true.
-
branches
boolean branches()
Returns true if execution after this statement does not necessarily continue at the following statement. GotoStmt and IfStmt will both return true.
-
toString
void toString(UnitPrinter up)
-
redirectJumpsToThisTo
void redirectJumpsToThisTo(Unit newLocation)
Redirects jumps to this Unit to newLocation. In general, you shouldn't have to use this directly.- See Also:
PatchingChain.getNonPatchingChain(),soot.shimple.Shimple#redirectToPreds(Chain, Unit),Shimple.redirectPointers(Unit, Unit)
-
-