Package jadx.core.dex.visitors.regions
Class LoopRegionVisitor
java.lang.Object
jadx.core.dex.visitors.AbstractVisitor
jadx.core.dex.visitors.regions.LoopRegionVisitor
- All Implemented Interfaces:
IDexTreeVisitor,IRegionVisitor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanargInLoop(MethodNode mth, LoopRegion loopRegion, RegisterArg arg) private static booleanassignOnlyInLoop(MethodNode mth, LoopRegion loopRegion, RegisterArg arg) private static LoopTypecheckArrayForEach(MethodNode mth, LoopRegion loopRegion, InsnNode initInsn, InsnNode incrInsn, IfCondition condition) private static booleancheckForIndexedLoop(MethodNode mth, LoopRegion loopRegion, IfCondition condition) Check for indexed loop.private static booleancheckInvoke(InsnNode insn, String declClsFullName, String mthId) Check if instruction is a interface invoke with corresponding parameters.private static booleancheckIterableForEach(MethodNode mth, LoopRegion loopRegion, IfCondition condition) booleanenterRegion(MethodNode mth, IRegion region) private static booleanfixIterableType(MethodNode mth, InsnArg iterableArg, RegisterArg iterVar) voidleaveRegion(MethodNode mth, IRegion region) voidprocessBlock(MethodNode mth, IBlock container) private static booleanprocessLoopRegion(MethodNode mth, LoopRegion loopRegion) private static booleanusedOnlyInLoop(MethodNode mth, LoopRegion loopRegion, RegisterArg arg) voidvisit(MethodNode mth) Visit methodMethods inherited from class jadx.core.dex.visitors.AbstractVisitor
getName, init, toString, visit
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG
-
-
Constructor Details
-
LoopRegionVisitor
public LoopRegionVisitor()
-
-
Method Details
-
visit
Description copied from interface:IDexTreeVisitorVisit method- Specified by:
visitin interfaceIDexTreeVisitor- Overrides:
visitin classAbstractVisitor
-
enterRegion
- Specified by:
enterRegionin interfaceIRegionVisitor- Returns:
- true for traverse sub-blocks, false otherwise.
-
processLoopRegion
-
checkForIndexedLoop
private static boolean checkForIndexedLoop(MethodNode mth, LoopRegion loopRegion, IfCondition condition) Check for indexed loop. -
checkArrayForEach
private static LoopType checkArrayForEach(MethodNode mth, LoopRegion loopRegion, InsnNode initInsn, InsnNode incrInsn, IfCondition condition) -
checkIterableForEach
private static boolean checkIterableForEach(MethodNode mth, LoopRegion loopRegion, IfCondition condition) -
fixIterableType
-
checkInvoke
Check if instruction is a interface invoke with corresponding parameters. -
assignOnlyInLoop
-
usedOnlyInLoop
-
argInLoop
-
leaveRegion
- Specified by:
leaveRegionin interfaceIRegionVisitor
-
processBlock
- Specified by:
processBlockin interfaceIRegionVisitor
-