Package soot.jimple.internal
Class AbstractSwitchStmt
- java.lang.Object
-
- soot.tagkit.AbstractHost
-
- soot.AbstractUnit
-
- soot.jimple.internal.AbstractStmt
-
- soot.jimple.internal.AbstractSwitchStmt
-
- All Implemented Interfaces:
Serializable,Context,ConvertToBaf,Stmt,SwitchStmt,Host,Unit,Switchable
- Direct Known Subclasses:
JLookupSwitchStmt,JTableSwitchStmt
public abstract class AbstractSwitchStmt extends AbstractStmt implements SwitchStmt
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected UnitBoxdefaultTargetBoxprotected ValueBoxkeyBoxprotected List<UnitBox>stmtBoxesprotected List<UnitBox>targetBoxes-
Fields inherited from class soot.AbstractUnit
boxesPointingToThis
-
Fields inherited from class soot.tagkit.AbstractHost
col, line, mTagList
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSwitchStmt(ValueBox keyBox, UnitBox defaultTargetBox, UnitBox... targetBoxes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbranches()Returns true if execution after this statement does not necessarily continue at the following statement.booleanfallsThrough()Returns true if execution after this statement may continue at the following statement.UnitgetDefaultTarget()UnitBoxgetDefaultTargetBox()ValuegetKey()ValueBoxgetKeyBox()UnitgetTarget(int index)UnitBoxgetTargetBox(int index)protected static UnitBox[]getTargetBoxesArray(List<? extends Unit> targets, Function<Unit,UnitBox> stmtBoxWrap)intgetTargetCount()List<Unit>getTargets()List<UnitBox>getUnitBoxes()Returns a list of Boxes containing Units defined in this Unit; typically branch targets.List<ValueBox>getUseBoxes()Returns a list of Boxes containing Values used in this Unit.voidsetDefaultTarget(Unit defaultTarget)voidsetKey(Value key)voidsetTarget(int index, Unit target)voidsetTargets(List<? extends Unit> targets)voidsetTargets(Unit[] targets)-
Methods inherited from class soot.jimple.internal.AbstractStmt
containsArrayRef, containsFieldRef, containsInvokeExpr, convertToBaf, getArrayRef, getArrayRefBox, getFieldRef, getFieldRefBox, getInvokeExpr, getInvokeExprBox
-
Methods inherited from class soot.AbstractUnit
addBoxPointingToThis, apply, clearUnitBoxes, clone, getBoxesPointingToThis, getDefBoxes, getUseAndDefBoxes, redirectJumpsToThisTo, removeBoxPointingToThis
-
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.jimple.Stmt
containsArrayRef, containsFieldRef, containsInvokeExpr, getArrayRef, getArrayRefBox, getFieldRef, getFieldRefBox, getInvokeExpr, getInvokeExprBox
-
Methods inherited from interface soot.util.Switchable
apply
-
Methods inherited from interface soot.jimple.SwitchStmt
getTargetForValue
-
Methods inherited from interface soot.Unit
addBoxPointingToThis, clearUnitBoxes, clone, getBoxesPointingToThis, getDefBoxes, getUseAndDefBoxes, redirectJumpsToThisTo, removeBoxPointingToThis, toString
-
-
-
-
Method Detail
-
getTargetBoxesArray
protected static UnitBox[] getTargetBoxesArray(List<? extends Unit> targets, Function<Unit,UnitBox> stmtBoxWrap)
-
getDefaultTarget
public final Unit getDefaultTarget()
- Specified by:
getDefaultTargetin interfaceSwitchStmt
-
setDefaultTarget
public final void setDefaultTarget(Unit defaultTarget)
- Specified by:
setDefaultTargetin interfaceSwitchStmt
-
getDefaultTargetBox
public final UnitBox getDefaultTargetBox()
- Specified by:
getDefaultTargetBoxin interfaceSwitchStmt
-
getKey
public final Value getKey()
- Specified by:
getKeyin interfaceSwitchStmt
-
setKey
public final void setKey(Value key)
- Specified by:
setKeyin interfaceSwitchStmt
-
getKeyBox
public final ValueBox getKeyBox()
- Specified by:
getKeyBoxin interfaceSwitchStmt
-
getUseBoxes
public final List<ValueBox> getUseBoxes()
Description copied from class:AbstractUnitReturns 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- Overrides:
getUseBoxesin classAbstractUnit
-
getTargetCount
public final int getTargetCount()
-
getTarget
public final Unit getTarget(int index)
- Specified by:
getTargetin interfaceSwitchStmt
-
getTargetBox
public final UnitBox getTargetBox(int index)
- Specified by:
getTargetBoxin interfaceSwitchStmt
-
setTarget
public final void setTarget(int index, Unit target)- Specified by:
setTargetin interfaceSwitchStmt
-
getTargets
public final List<Unit> getTargets()
- Specified by:
getTargetsin interfaceSwitchStmt
-
setTargets
public final void setTargets(Unit[] targets)
-
getUnitBoxes
public final List<UnitBox> getUnitBoxes()
Description copied from class:AbstractUnitReturns 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- Overrides:
getUnitBoxesin classAbstractUnit
-
fallsThrough
public final boolean fallsThrough()
Description copied from interface:UnitReturns true if execution after this statement may continue at the following statement. GotoStmt will return false but IfStmt will return true.- Specified by:
fallsThroughin interfaceUnit
-
-