Search in sources :

Example 1 with GenericTypesVisitor

use of jadx.core.dex.visitors.GenericTypesVisitor in project jadx by skylot.

the class Jadx method getPassesList.

public static List<IDexTreeVisitor> getPassesList(JadxArgs args) {
    if (args.isFallbackMode()) {
        return getFallbackPassesList();
    }
    List<IDexTreeVisitor> passes = new ArrayList<>();
    // instructions IR
    passes.add(new CheckCode());
    if (args.isDebugInfo()) {
        passes.add(new DebugInfoAttachVisitor());
    }
    passes.add(new AttachTryCatchVisitor());
    if (args.getCommentsLevel() != CommentsLevel.NONE) {
        passes.add(new AttachCommentsVisitor());
    }
    passes.add(new AttachMethodDetails());
    passes.add(new ProcessInstructionsVisitor());
    // blocks IR
    passes.add(new BlockSplitter());
    passes.add(new BlockProcessor());
    if (args.isRawCFGOutput()) {
        passes.add(DotGraphVisitor.dumpRaw());
    }
    passes.add(new SSATransform());
    passes.add(new MoveInlineVisitor());
    passes.add(new ConstructorVisitor());
    passes.add(new InitCodeVariables());
    if (args.isExtractFinally()) {
        passes.add(new MarkFinallyVisitor());
    }
    passes.add(new ConstInlineVisitor());
    passes.add(new TypeInferenceVisitor());
    if (args.isDebugInfo()) {
        passes.add(new DebugInfoApplyVisitor());
    }
    if (args.getUseKotlinMethodsForVarNames() != JadxArgs.UseKotlinMethodsForVarNames.DISABLE) {
        passes.add(new ProcessKotlinInternals());
    }
    passes.add(new CodeRenameVisitor());
    if (args.isInlineMethods()) {
        passes.add(new InlineMethods());
    }
    passes.add(new GenericTypesVisitor());
    passes.add(new ShadowFieldVisitor());
    passes.add(new DeboxingVisitor());
    passes.add(new AnonymousClassVisitor());
    passes.add(new ModVisitor());
    passes.add(new CodeShrinkVisitor());
    passes.add(new ReSugarCode());
    if (args.isCfgOutput()) {
        passes.add(DotGraphVisitor.dump());
    }
    // regions IR
    passes.add(new RegionMakerVisitor());
    passes.add(new IfRegionVisitor());
    passes.add(new ReturnVisitor());
    passes.add(new CleanRegions());
    passes.add(new CodeShrinkVisitor());
    passes.add(new MethodInvokeVisitor());
    passes.add(new SimplifyVisitor());
    passes.add(new CheckRegions());
    passes.add(new EnumVisitor());
    passes.add(new ExtractFieldInit());
    passes.add(new FixAccessModifiers());
    passes.add(new ClassModifier());
    passes.add(new LoopRegionVisitor());
    if (args.isInlineMethods()) {
        passes.add(new MarkMethodsForInline());
    }
    passes.add(new ProcessVariables());
    passes.add(new PrepareForCodeGen());
    if (args.isCfgOutput()) {
        passes.add(DotGraphVisitor.dumpRegions());
    }
    return passes;
}
Also used : RegionMakerVisitor(jadx.core.dex.visitors.regions.RegionMakerVisitor) InlineMethods(jadx.core.dex.visitors.InlineMethods) CleanRegions(jadx.core.dex.visitors.regions.CleanRegions) AttachMethodDetails(jadx.core.dex.visitors.AttachMethodDetails) IfRegionVisitor(jadx.core.dex.visitors.regions.IfRegionVisitor) ClassModifier(jadx.core.dex.visitors.ClassModifier) ArrayList(java.util.ArrayList) FixAccessModifiers(jadx.core.dex.visitors.FixAccessModifiers) CodeShrinkVisitor(jadx.core.dex.visitors.shrink.CodeShrinkVisitor) IDexTreeVisitor(jadx.core.dex.visitors.IDexTreeVisitor) ProcessVariables(jadx.core.dex.visitors.regions.variables.ProcessVariables) ReSugarCode(jadx.core.dex.visitors.ReSugarCode) MarkMethodsForInline(jadx.core.dex.visitors.MarkMethodsForInline) CodeRenameVisitor(jadx.core.dex.visitors.rename.CodeRenameVisitor) CheckCode(jadx.core.dex.visitors.CheckCode) AttachTryCatchVisitor(jadx.core.dex.visitors.AttachTryCatchVisitor) CheckRegions(jadx.core.dex.visitors.regions.CheckRegions) SSATransform(jadx.core.dex.visitors.ssa.SSATransform) ShadowFieldVisitor(jadx.core.dex.visitors.ShadowFieldVisitor) DeboxingVisitor(jadx.core.dex.visitors.DeboxingVisitor) PrepareForCodeGen(jadx.core.dex.visitors.PrepareForCodeGen) ProcessInstructionsVisitor(jadx.core.dex.visitors.ProcessInstructionsVisitor) DebugInfoAttachVisitor(jadx.core.dex.visitors.debuginfo.DebugInfoAttachVisitor) MarkFinallyVisitor(jadx.core.dex.visitors.finaly.MarkFinallyVisitor) ProcessKotlinInternals(jadx.core.dex.visitors.kotlin.ProcessKotlinInternals) ConstructorVisitor(jadx.core.dex.visitors.ConstructorVisitor) TypeInferenceVisitor(jadx.core.dex.visitors.typeinference.TypeInferenceVisitor) DebugInfoApplyVisitor(jadx.core.dex.visitors.debuginfo.DebugInfoApplyVisitor) ExtractFieldInit(jadx.core.dex.visitors.ExtractFieldInit) EnumVisitor(jadx.core.dex.visitors.EnumVisitor) GenericTypesVisitor(jadx.core.dex.visitors.GenericTypesVisitor) MethodInvokeVisitor(jadx.core.dex.visitors.MethodInvokeVisitor) AnonymousClassVisitor(jadx.core.dex.visitors.AnonymousClassVisitor) AttachCommentsVisitor(jadx.core.dex.visitors.AttachCommentsVisitor) ModVisitor(jadx.core.dex.visitors.ModVisitor) SimplifyVisitor(jadx.core.dex.visitors.SimplifyVisitor) MoveInlineVisitor(jadx.core.dex.visitors.MoveInlineVisitor) LoopRegionVisitor(jadx.core.dex.visitors.regions.LoopRegionVisitor) BlockProcessor(jadx.core.dex.visitors.blocks.BlockProcessor) ConstInlineVisitor(jadx.core.dex.visitors.ConstInlineVisitor) ReturnVisitor(jadx.core.dex.visitors.regions.ReturnVisitor) BlockSplitter(jadx.core.dex.visitors.blocks.BlockSplitter) InitCodeVariables(jadx.core.dex.visitors.InitCodeVariables)

Aggregations

AnonymousClassVisitor (jadx.core.dex.visitors.AnonymousClassVisitor)1 AttachCommentsVisitor (jadx.core.dex.visitors.AttachCommentsVisitor)1 AttachMethodDetails (jadx.core.dex.visitors.AttachMethodDetails)1 AttachTryCatchVisitor (jadx.core.dex.visitors.AttachTryCatchVisitor)1 CheckCode (jadx.core.dex.visitors.CheckCode)1 ClassModifier (jadx.core.dex.visitors.ClassModifier)1 ConstInlineVisitor (jadx.core.dex.visitors.ConstInlineVisitor)1 ConstructorVisitor (jadx.core.dex.visitors.ConstructorVisitor)1 DeboxingVisitor (jadx.core.dex.visitors.DeboxingVisitor)1 EnumVisitor (jadx.core.dex.visitors.EnumVisitor)1 ExtractFieldInit (jadx.core.dex.visitors.ExtractFieldInit)1 FixAccessModifiers (jadx.core.dex.visitors.FixAccessModifiers)1 GenericTypesVisitor (jadx.core.dex.visitors.GenericTypesVisitor)1 IDexTreeVisitor (jadx.core.dex.visitors.IDexTreeVisitor)1 InitCodeVariables (jadx.core.dex.visitors.InitCodeVariables)1 InlineMethods (jadx.core.dex.visitors.InlineMethods)1 MarkMethodsForInline (jadx.core.dex.visitors.MarkMethodsForInline)1 MethodInvokeVisitor (jadx.core.dex.visitors.MethodInvokeVisitor)1 ModVisitor (jadx.core.dex.visitors.ModVisitor)1 MoveInlineVisitor (jadx.core.dex.visitors.MoveInlineVisitor)1