Package soot.jimple.internal
Class JLookupSwitchStmt
- java.lang.Object
-
- soot.tagkit.AbstractHost
-
- soot.AbstractUnit
-
- soot.jimple.internal.AbstractStmt
-
- soot.jimple.internal.AbstractSwitchStmt
-
- soot.jimple.internal.JLookupSwitchStmt
-
- All Implemented Interfaces:
Serializable,Context,ConvertToBaf,LookupSwitchStmt,Stmt,SwitchStmt,Host,Unit,Switchable
- Direct Known Subclasses:
GLookupSwitchStmt
public class JLookupSwitchStmt extends AbstractSwitchStmt implements LookupSwitchStmt
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<IntConstant>lookupValuesList of lookup values from the corresponding bytecode instruction, represented as IntConstants.-
Fields inherited from class soot.jimple.internal.AbstractSwitchStmt
defaultTargetBox, keyBox, stmtBoxes, targetBoxes
-
Fields inherited from class soot.AbstractUnit
boxesPointingToThis
-
Fields inherited from class soot.tagkit.AbstractHost
col, line, mTagList
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJLookupSwitchStmt(ValueBox keyBox, List<IntConstant> lookupValues, UnitBox[] targetBoxes, UnitBox defaultTargetBox)JLookupSwitchStmt(Value key, List<IntConstant> lookupValues, List<? extends Unit> targets, Unit defaultTarget)Constructs a new JLookupSwitchStmt.JLookupSwitchStmt(Value key, List<IntConstant> lookupValues, List<? extends UnitBox> targets, UnitBox defaultTarget)Constructs a new JLookupSwitchStmt.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(Switch sw)Used to implement the Switchable construct.Objectclone()Returns a deep clone of this object.voidconvertToBaf(JimpleToBafContext context, List<Unit> out)intgetLookupValue(int index)List<IntConstant>getLookupValues()UnitgetTargetForValue(int value)Returns the target unit if a value with value "value" is the keyvoidsetLookupValue(int index, int value)voidsetLookupValues(List<IntConstant> lookupValues)StringtoString()voidtoString(UnitPrinter up)-
Methods inherited from class soot.jimple.internal.AbstractSwitchStmt
branches, fallsThrough, getDefaultTarget, getDefaultTargetBox, getKey, getKeyBox, getTarget, getTargetBox, getTargetBoxesArray, getTargetCount, getTargets, getUnitBoxes, getUseBoxes, setDefaultTarget, setKey, setTarget, setTargets, setTargets
-
Methods inherited from class soot.jimple.internal.AbstractStmt
containsArrayRef, containsFieldRef, containsInvokeExpr, getArrayRef, getArrayRefBox, getFieldRef, getFieldRefBox, getInvokeExpr, getInvokeExprBox
-
Methods inherited from class soot.AbstractUnit
addBoxPointingToThis, clearUnitBoxes, 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, 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.LookupSwitchStmt
getTargetCount, setTargets
-
Methods inherited from interface soot.jimple.Stmt
containsArrayRef, containsFieldRef, containsInvokeExpr, getArrayRef, getArrayRefBox, getFieldRef, getFieldRefBox, getInvokeExpr, getInvokeExprBox
-
Methods inherited from interface soot.jimple.SwitchStmt
getDefaultTarget, getDefaultTargetBox, getKey, getKeyBox, getTarget, getTargetBox, getTargets, setDefaultTarget, setKey, setTarget
-
Methods inherited from interface soot.Unit
addBoxPointingToThis, branches, clearUnitBoxes, fallsThrough, getBoxesPointingToThis, getDefBoxes, getUnitBoxes, getUseAndDefBoxes, getUseBoxes, redirectJumpsToThisTo, removeBoxPointingToThis
-
-
-
-
Field Detail
-
lookupValues
protected List<IntConstant> lookupValues
List of lookup values from the corresponding bytecode instruction, represented as IntConstants.
-
-
Constructor Detail
-
JLookupSwitchStmt
public JLookupSwitchStmt(Value key, List<IntConstant> lookupValues, List<? extends Unit> targets, Unit defaultTarget)
Constructs a new JLookupSwitchStmt. lookupValues should be a list of IntConst s.
-
JLookupSwitchStmt
public JLookupSwitchStmt(Value key, List<IntConstant> lookupValues, List<? extends UnitBox> targets, UnitBox defaultTarget)
Constructs a new JLookupSwitchStmt. lookupValues should be a list of IntConst s.
-
JLookupSwitchStmt
protected JLookupSwitchStmt(ValueBox keyBox, List<IntConstant> lookupValues, UnitBox[] targetBoxes, UnitBox defaultTargetBox)
-
-
Method Detail
-
clone
public Object clone()
Description copied from class:AbstractUnitReturns a deep clone of this object.- Specified by:
clonein interfaceUnit- Specified by:
clonein classAbstractUnit
-
toString
public void toString(UnitPrinter up)
-
setLookupValues
public void setLookupValues(List<IntConstant> lookupValues)
- Specified by:
setLookupValuesin interfaceLookupSwitchStmt
-
setLookupValue
public void setLookupValue(int index, int value)- Specified by:
setLookupValuein interfaceLookupSwitchStmt
-
getLookupValue
public int getLookupValue(int index)
- Specified by:
getLookupValuein interfaceLookupSwitchStmt
-
getLookupValues
public List<IntConstant> getLookupValues()
- Specified by:
getLookupValuesin interfaceLookupSwitchStmt
-
apply
public void apply(Switch sw)
Description copied from class:AbstractUnitUsed to implement the Switchable construct.- Specified by:
applyin interfaceSwitchable- Overrides:
applyin classAbstractUnit
-
convertToBaf
public void convertToBaf(JimpleToBafContext context, List<Unit> out)
- Specified by:
convertToBafin interfaceConvertToBaf- Overrides:
convertToBafin classAbstractStmt
-
getTargetForValue
public Unit getTargetForValue(int value)
Description copied from interface:SwitchStmtReturns the target unit if a value with value "value" is the key- Specified by:
getTargetForValuein interfaceSwitchStmt- Parameters:
value- the value- Returns:
- the target
-
-