提交 039f6eeb 编写于 作者: S Skylot

core: rename depth traversal class

上级 8a464e82
package jadx.core; package jadx.core;
import jadx.core.dex.nodes.ClassNode; import jadx.core.dex.nodes.ClassNode;
import jadx.core.dex.visitors.DepthTraverser; import jadx.core.dex.visitors.DepthTraversal;
import jadx.core.dex.visitors.IDexTreeVisitor; import jadx.core.dex.visitors.IDexTreeVisitor;
import jadx.core.utils.exceptions.DecodeException; import jadx.core.utils.exceptions.DecodeException;
...@@ -20,7 +20,7 @@ public final class ProcessClass { ...@@ -20,7 +20,7 @@ public final class ProcessClass {
try { try {
cls.load(); cls.load();
for (IDexTreeVisitor visitor : passes) { for (IDexTreeVisitor visitor : passes) {
DepthTraverser.visit(visitor, cls); DepthTraversal.visit(visitor, cls);
} }
} catch (DecodeException e) { } catch (DecodeException e) {
LOG.error("Decode exception: " + cls, e); LOG.error("Decode exception: " + cls, e);
......
...@@ -14,7 +14,7 @@ import jadx.core.dex.nodes.InsnNode; ...@@ -14,7 +14,7 @@ import jadx.core.dex.nodes.InsnNode;
import jadx.core.dex.nodes.MethodNode; import jadx.core.dex.nodes.MethodNode;
import jadx.core.dex.regions.Region; import jadx.core.dex.regions.Region;
import jadx.core.dex.trycatch.CatchAttr; import jadx.core.dex.trycatch.CatchAttr;
import jadx.core.dex.visitors.DepthTraverser; import jadx.core.dex.visitors.DepthTraversal;
import jadx.core.dex.visitors.FallbackModeVisitor; import jadx.core.dex.visitors.FallbackModeVisitor;
import jadx.core.utils.ErrorsCounter; import jadx.core.utils.ErrorsCounter;
import jadx.core.utils.InsnUtils; import jadx.core.utils.InsnUtils;
...@@ -274,7 +274,7 @@ public class MethodGen { ...@@ -274,7 +274,7 @@ public class MethodGen {
// load original instructions // load original instructions
try { try {
mth.load(); mth.load();
DepthTraverser.visit(new FallbackModeVisitor(), mth); DepthTraversal.visit(new FallbackModeVisitor(), mth);
} catch (DecodeException e) { } catch (DecodeException e) {
LOG.error("Error reload instructions in fallback mode:", e); LOG.error("Error reload instructions in fallback mode:", e);
code.startLine("// Can't loadFile method instructions: " + e.getMessage()); code.startLine("// Can't loadFile method instructions: " + e.getMessage());
......
...@@ -4,7 +4,7 @@ import jadx.core.dex.nodes.ClassNode; ...@@ -4,7 +4,7 @@ import jadx.core.dex.nodes.ClassNode;
import jadx.core.dex.nodes.MethodNode; import jadx.core.dex.nodes.MethodNode;
import jadx.core.utils.ErrorsCounter; import jadx.core.utils.ErrorsCounter;
public class DepthTraverser { public class DepthTraversal {
public static void visit(IDexTreeVisitor visitor, ClassNode cls) { public static void visit(IDexTreeVisitor visitor, ClassNode cls) {
try { try {
......
...@@ -3,7 +3,7 @@ package jadx.api; ...@@ -3,7 +3,7 @@ package jadx.api;
import jadx.core.Jadx; import jadx.core.Jadx;
import jadx.core.dex.nodes.ClassNode; import jadx.core.dex.nodes.ClassNode;
import jadx.core.dex.nodes.MethodNode; import jadx.core.dex.nodes.MethodNode;
import jadx.core.dex.visitors.DepthTraverser; import jadx.core.dex.visitors.DepthTraversal;
import jadx.core.dex.visitors.IDexTreeVisitor; import jadx.core.dex.visitors.IDexTreeVisitor;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
...@@ -66,7 +66,7 @@ public abstract class InternalJadxTest extends TestUtils { ...@@ -66,7 +66,7 @@ public abstract class InternalJadxTest extends TestUtils {
} }
}, new File(outDir)); }, new File(outDir));
for (IDexTreeVisitor visitor : passes) { for (IDexTreeVisitor visitor : passes) {
DepthTraverser.visit(visitor, cls); DepthTraversal.visit(visitor, cls);
} }
assertThat(cls.getCode().toString(), not(containsString("inconsistent"))); assertThat(cls.getCode().toString(), not(containsString("inconsistent")));
return cls; return cls;
......
...@@ -2,7 +2,7 @@ package jadx.tests.internal; ...@@ -2,7 +2,7 @@ package jadx.tests.internal;
import jadx.api.InternalJadxTest; import jadx.api.InternalJadxTest;
import jadx.core.dex.nodes.ClassNode; import jadx.core.dex.nodes.ClassNode;
import jadx.core.dex.visitors.DepthTraverser; import jadx.core.dex.visitors.DepthTraversal;
import jadx.core.dex.visitors.IDexTreeVisitor; import jadx.core.dex.visitors.IDexTreeVisitor;
import jadx.core.utils.exceptions.DecodeException; import jadx.core.utils.exceptions.DecodeException;
...@@ -28,7 +28,7 @@ public class TestVariablesDefinitions extends InternalJadxTest { ...@@ -28,7 +28,7 @@ public class TestVariablesDefinitions extends InternalJadxTest {
cls.load(); cls.load();
Iterator<IDexTreeVisitor> iterator = passes.iterator(); Iterator<IDexTreeVisitor> iterator = passes.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
DepthTraverser.visit(iterator.next(), cls); DepthTraversal.visit(iterator.next(), cls);
} }
} catch (DecodeException e) { } catch (DecodeException e) {
LOG.error("Decode exception: " + cls, e); LOG.error("Decode exception: " + cls, e);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册