Package jadx.core.dex.instructions
Class IfNode
- All Implemented Interfaces:
IAttributeNode,ILineAttributeNode
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeCondition(IfOp op, InsnArg arg1, InsnArg arg2) copy()Make copy of InsnNode object.getOp()intvoidinitBlocks(BlockNode curBlock) voidboolean'Soft' equals, don't compare arguments, only instruction specific parameters.private static ArgTypenarrowTypeByOp(IfOp op) voidChange 'a != false' to 'a == true'booleanreplaceTargetBlock(BlockNode origin, BlockNode replace) toString()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, duplicateArg, equals, getArg, getArgIndex, getArgList, getArgsCount, getArguments, getOffset, getRegisterArgs, getResult, getType, hashCode, inheritMetadata, isConstInsn, isDeepEquals, isExitEdgeInsn, rebindArgs, removeArg, removeArg, replaceArg, setArg, setOffset, setResult, visitArgs, visitArgs, visitInsns, visitInsns, wrapArgMethods inherited from class jadx.core.dex.attributes.nodes.LineAttrNode
addSourceLineFrom, copyLines, getDefPosition, getSourceLine, setDefPosition, setSourceLineMethods 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
-
Field Details
-
op
-
thenBlock
-
elseBlock
-
WIDE_TYPE
-
NUMBERS_TYPE
-
-
Constructor Details
-
IfNode
-
IfNode
-
IfNode
-
-
Method Details
-
narrowTypeByOp
-
getOp
-
invertCondition
public void invertCondition() -
normalize
public void normalize()Change 'a != false' to 'a == true' -
changeCondition
-
initBlocks
- Overrides:
initBlocksin classTargetInsnNode
-
replaceTargetBlock
- Overrides:
replaceTargetBlockin classTargetInsnNode
-
getThenBlock
-
getElseBlock
-
getTarget
public int getTarget() -
isSame
Description copied from class:InsnNode'Soft' equals, don't compare arguments, only instruction specific parameters. -
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
-
toString
-