Search in sources :

Example 6 with IfNode

use of jadx.core.dex.instructions.IfNode in project jadx by skylot.

the class BlockSplitter method isDoWhile.

private static boolean isDoWhile(Map<Integer, BlockNode> blocksMap, BlockNode curBlock, InsnNode insn) {
    // split 'do-while' block (last instruction: 'if', target this block)
    if (insn.getType() == InsnType.IF) {
        IfNode ifs = (IfNode) insn;
        BlockNode targetBlock = blocksMap.get(ifs.getTarget());
        if (targetBlock == curBlock) {
            return true;
        }
    }
    return false;
}
Also used : BlockNode(jadx.core.dex.nodes.BlockNode) IfNode(jadx.core.dex.instructions.IfNode)

Aggregations

IfNode (jadx.core.dex.instructions.IfNode)6 InsnNode (jadx.core.dex.nodes.InsnNode)3 SwitchNode (jadx.core.dex.instructions.SwitchNode)2 LiteralArg (jadx.core.dex.instructions.args.LiteralArg)2 BlockNode (jadx.core.dex.nodes.BlockNode)2 LoopInfo (jadx.core.dex.attributes.nodes.LoopInfo)1 LoopLabelAttr (jadx.core.dex.attributes.nodes.LoopLabelAttr)1 FieldInfo (jadx.core.dex.info.FieldInfo)1 ConstClassNode (jadx.core.dex.instructions.ConstClassNode)1 ConstStringNode (jadx.core.dex.instructions.ConstStringNode)1 FillArrayNode (jadx.core.dex.instructions.FillArrayNode)1 GotoNode (jadx.core.dex.instructions.GotoNode)1 IndexInsnNode (jadx.core.dex.instructions.IndexInsnNode)1 InsnType (jadx.core.dex.instructions.InsnType)1 ArgType (jadx.core.dex.instructions.args.ArgType)1 InsnArg (jadx.core.dex.instructions.args.InsnArg)1 InsnWrapArg (jadx.core.dex.instructions.args.InsnWrapArg)1 RegisterArg (jadx.core.dex.instructions.args.RegisterArg)1 IfCondition (jadx.core.dex.regions.conditions.IfCondition)1 IfInfo (jadx.core.dex.regions.conditions.IfInfo)1