Search in sources :

Example 1 with CodeGen

use of jadx.core.codegen.CodeGen in project jadx by skylot.

the class IntegrationTest method decompile.

private void decompile(JadxDecompiler jadx, ClassNode cls) {
    List<IDexTreeVisitor> passes = Jadx.getPassesList(jadx.getArgs(), new File(outDir));
    ProcessClass.process(cls, passes, new CodeGen(jadx.getArgs()));
}
Also used : IDexTreeVisitor(jadx.core.dex.visitors.IDexTreeVisitor) CodeGen(jadx.core.codegen.CodeGen) File(java.io.File)

Example 2 with CodeGen

use of jadx.core.codegen.CodeGen in project jadx by skylot.

the class IntegrationTest method decompileWithoutUnload.

private void decompileWithoutUnload(JadxDecompiler d, ClassNode cls) {
    cls.load();
    List<IDexTreeVisitor> passes = Jadx.getPassesList(d.getArgs(), new File(outDir));
    for (IDexTreeVisitor visitor : passes) {
        DepthTraversal.visit(visitor, cls);
    }
    try {
        new CodeGen(d.getArgs()).visit(cls);
    } catch (CodegenException e) {
        e.printStackTrace();
        fail(e.getMessage());
    }
// don't unload class
}
Also used : IDexTreeVisitor(jadx.core.dex.visitors.IDexTreeVisitor) CodegenException(jadx.core.utils.exceptions.CodegenException) CodeGen(jadx.core.codegen.CodeGen) File(java.io.File)

Example 3 with CodeGen

use of jadx.core.codegen.CodeGen in project jadx by skylot.

the class JadxDecompiler method init.

void init() {
    if (outDir == null) {
        outDir = new JadxArgs().getOutDir();
    }
    this.passes = Jadx.getPassesList(args, outDir);
    this.codeGen = new CodeGen(args);
}
Also used : CodeGen(jadx.core.codegen.CodeGen)

Aggregations

CodeGen (jadx.core.codegen.CodeGen)3 IDexTreeVisitor (jadx.core.dex.visitors.IDexTreeVisitor)2 File (java.io.File)2 CodegenException (jadx.core.utils.exceptions.CodegenException)1