Package jadx.core.dex.instructions
Class SwitchInsn
- java.lang.Object
-
- jadx.core.dex.attributes.AttrNode
-
- jadx.core.dex.attributes.nodes.LineAttrNode
-
- jadx.core.dex.nodes.InsnNode
-
- jadx.core.dex.instructions.TargetInsnNode
-
- jadx.core.dex.instructions.SwitchInsn
-
- All Implemented Interfaces:
IAttributeNode,ILineAttributeNode
public class SwitchInsn extends TargetInsnNode
-
-
Constructor Summary
Constructors Constructor Description SwitchInsn(InsnArg arg, int dataTarget, boolean packed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattachSwitchData(SwitchData data, int def)InsnNodecopy()Make copy of InsnNode object.intgetDataTarget()intgetDefaultCaseOffset()BlockNodegetDefTargetBlock()java.lang.ObjectgetKey(int i)int[]getKeys()BlockNode[]getTargetBlocks()int[]getTargets()voidinitBlocks(BlockNode curBlock)booleanisPacked()booleanisSame(InsnNode obj)'Soft' equals, don't compare arguments, only instruction specific parameters.voidmodifyKey(int i, java.lang.Object newKey)booleanneedData()booleanreplaceTargetBlock(BlockNode origin, BlockNode replace)java.lang.StringtoString()-
Methods inherited from class jadx.core.dex.nodes.InsnNode
addArg, addLit, addLit, addReg, addReg, appendArgs, appendAttributes, attachArg, attributesString, baseString, canRemoveResult, canReorder, canThrowException, containsArg, containsVar, containsWrappedInsn, copy, copyAttributesFrom, copyCommonParams, copyWithNewSsaVar, copyWithoutResult, copyWithoutSsa, equals, getArg, getArgIndex, getArgList, getArgsCount, getArguments, getOffset, getRegisterArgs, getResult, getType, hashCode, inheritMetadata, isConstInsn, isDeepEquals, rebindArgs, removeArg, removeArg, replaceArg, setArg, setOffset, setResult, visitArgs, visitArgs, visitInsns, visitInsns, wrapArg
-
Methods inherited from class jadx.core.dex.attributes.nodes.LineAttrNode
addSourceLineFrom, copyLines, getDefPosition, getSourceLine, setDefPosition, setSourceLine
-
Methods inherited from class jadx.core.dex.attributes.AttrNode
add, addAttr, addAttr, addAttr, addAttrs, clearAttributes, contains, contains, copyAttributeFrom, copyAttributesFrom, get, getAll, getAnnotation, getAttributesString, getAttributesStringsList, isAttrStorageEmpty, remove, remove, removeAttr, rewriteAttributeFrom, unloadAttributes
-
-
-
-
Constructor Detail
-
SwitchInsn
public SwitchInsn(InsnArg arg, int dataTarget, boolean packed)
-
-
Method Detail
-
needData
public boolean needData()
-
attachSwitchData
public void attachSwitchData(SwitchData data, int def)
-
initBlocks
public void initBlocks(BlockNode curBlock)
- Overrides:
initBlocksin classTargetInsnNode
-
replaceTargetBlock
public boolean replaceTargetBlock(BlockNode origin, BlockNode replace)
- Overrides:
replaceTargetBlockin classTargetInsnNode
-
isSame
public boolean isSame(InsnNode obj)
Description copied from class:InsnNode'Soft' equals, don't compare arguments, only instruction specific parameters.
-
copy
public InsnNode copy()
Description copied from class:InsnNodeMake copy of InsnNode object.
NOTE: can't copy instruction with result argument (SSA variable can't be used in two different assigns).
Prefer use next methods:InsnNode.copyWithoutResult()to explicitly state that result not neededInsnNode.copy(RegisterArg)to provide new result argInsnNode.copyWithNewSsaVar(MethodNode)to make new SSA variable for result arg
-
getDataTarget
public int getDataTarget()
-
isPacked
public boolean isPacked()
-
getDefaultCaseOffset
public int getDefaultCaseOffset()
-
getTargets
public int[] getTargets()
-
getKeys
public int[] getKeys()
-
getKey
public java.lang.Object getKey(int i)
-
modifyKey
public void modifyKey(int i, java.lang.Object newKey)
-
getTargetBlocks
public BlockNode[] getTargetBlocks()
-
getDefTargetBlock
public BlockNode getDefTargetBlock()
-
-