Search in sources :

Example 1 with FileUtils

use of jadx.core.utils.files.FileUtils in project jadx by skylot.

the class JadxCLIArgs method toJadxArgs.

public JadxArgs toJadxArgs() {
    JadxArgs args = new JadxArgs();
    args.setInputFiles(files.stream().map(FileUtils::toFile).collect(Collectors.toList()));
    args.setOutDir(FileUtils.toFile(outDir));
    args.setOutDirSrc(FileUtils.toFile(outDirSrc));
    args.setOutDirRes(FileUtils.toFile(outDirRes));
    args.setOutputFormat(JadxArgs.OutputFormatEnum.valueOf(outputFormat.toUpperCase()));
    args.setThreadsCount(threadsCount);
    args.setSkipSources(skipSources);
    args.setSkipResources(skipResources);
    args.setFallbackMode(fallbackMode);
    args.setShowInconsistentCode(showInconsistentCode);
    args.setCfgOutput(cfgOutput);
    args.setRawCFGOutput(rawCfgOutput);
    args.setReplaceConsts(replaceConsts);
    args.setDeobfuscationOn(deobfuscationOn);
    args.setDeobfuscationMapFile(FileUtils.toFile(deobfuscationMapFile));
    if (deobfuscationForceSave) {
        args.setDeobfuscationMapFileMode(DeobfuscationMapFileMode.OVERWRITE);
    } else {
        args.setDeobfuscationMapFileMode(deobfuscationMapFileMode);
    }
    args.setDeobfuscationMinLength(deobfuscationMinLength);
    args.setDeobfuscationMaxLength(deobfuscationMaxLength);
    args.setUseSourceNameAsClassAlias(deobfuscationUseSourceNameAsAlias);
    args.setParseKotlinMetadata(deobfuscationParseKotlinMetadata);
    args.setUseKotlinMethodsForVarNames(useKotlinMethodsForVarNames);
    args.setEscapeUnicode(escapeUnicode);
    args.setRespectBytecodeAccModifiers(respectBytecodeAccessModifiers);
    args.setExportAsGradleProject(exportAsGradleProject);
    args.setUseImports(useImports);
    args.setDebugInfo(debugInfo);
    args.setInsertDebugLines(addDebugLines);
    args.setInlineAnonymousClasses(inlineAnonymousClasses);
    args.setInlineMethods(inlineMethods);
    args.setRenameFlags(renameFlags);
    args.setFsCaseSensitive(fsCaseSensitive);
    args.setCommentsLevel(commentsLevel);
    args.setUseDxInput(useDx);
    args.setPluginOptions(pluginOptions);
    return args;
}
Also used : FileUtils(jadx.core.utils.files.FileUtils) JadxArgs(jadx.api.JadxArgs)

Aggregations

JadxArgs (jadx.api.JadxArgs)1 FileUtils (jadx.core.utils.files.FileUtils)1