public final class JadxDecompiler
extends java.lang.Object
implements java.io.Closeable
JadxArgs args = new JadxArgs();
args.getInputFiles().add(new File("test.apk"));
args.setOutDir(new File("jadx-test-output"));
try (JadxDecompiler jadx = new JadxDecompiler(args)) {
jadx.load();
jadx.save();
}
Instead of 'save()' you can iterate over decompiled classes:
for(JavaClass cls : jadx.getClasses()) {
System.out.println(cls.getCode());
}
| Modifier and Type | Class and Description |
|---|---|
static interface |
JadxDecompiler.ProgressListener |
| Constructor and Description |
|---|
JadxDecompiler() |
JadxDecompiler(JadxArgs args) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomLoad(jadx.api.plugins.input.data.ILoadResult customLoad) |
void |
close() |
JadxArgs |
getArgs() |
java.util.List<JavaClass> |
getClasses() |
java.util.List<JavaClass> |
getClassesWithInners() |
@Nullable JavaNode |
getClosestJavaNode(ICodeInfo codeInfo,
int pos) |
java.util.List<jadx.api.plugins.input.data.ILoadResult> |
getCustomLoads() |
IDecompileScheduler |
getDecompileScheduler() |
@Nullable JavaNode |
getEnclosingNode(ICodeInfo codeInfo,
int pos) |
int |
getErrorsCount() |
@Nullable JavaNode |
getJavaNodeAtPosition(ICodeInfo codeInfo,
int pos) |
@Nullable JavaNode |
getJavaNodeByCodeAnnotation(@Nullable ICodeInfo codeInfo,
@Nullable ICodeAnnotation ann) |
@Nullable JavaNode |
getJavaNodeByRef(ICodeNodeRef ann) |
java.util.List<JavaPackage> |
getPackages() |
jadx.api.plugins.JadxPluginManager |
getPluginManager() |
java.util.List<ResourceFile> |
getResources() |
RootNode |
getRoot()
Internal API.
|
java.util.concurrent.ExecutorService |
getSaveExecutor() |
java.util.List<java.lang.Runnable> |
getSaveTasks() |
static java.lang.String |
getVersion() |
int |
getWarnsCount() |
void |
load() |
void |
printErrorsReport() |
void |
registerPlugin(jadx.api.plugins.JadxPlugin plugin) |
void |
reloadCodeData() |
void |
save() |
void |
save(int intervalInMillis,
JadxDecompiler.ProgressListener listener) |
void |
saveResources() |
void |
saveSources() |
@Nullable ClassNode |
searchClassNodeByOrigFullName(java.lang.String fullName) |
@Nullable JavaClass |
searchJavaClassByAliasFullName(java.lang.String fullName) |
@Nullable JavaClass |
searchJavaClassByOrigFullName(java.lang.String fullName) |
@Nullable JavaClass |
searchJavaClassOrItsParentByOrigFullName(java.lang.String fullName) |
java.lang.String |
toString() |
public JadxDecompiler()
public JadxDecompiler(JadxArgs args)
public void load()
public void addCustomLoad(jadx.api.plugins.input.data.ILoadResult customLoad)
public java.util.List<jadx.api.plugins.input.data.ILoadResult> getCustomLoads()
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic void registerPlugin(jadx.api.plugins.JadxPlugin plugin)
public static java.lang.String getVersion()
public void save()
public void save(int intervalInMillis,
JadxDecompiler.ProgressListener listener)
public void saveSources()
public void saveResources()
public java.util.concurrent.ExecutorService getSaveExecutor()
public java.util.List<java.lang.Runnable> getSaveTasks()
public java.util.List<JavaClass> getClasses()
public java.util.List<JavaClass> getClassesWithInners()
public java.util.List<ResourceFile> getResources()
public java.util.List<JavaPackage> getPackages()
public int getErrorsCount()
public int getWarnsCount()
public void printErrorsReport()
@ApiStatus.Internal public RootNode getRoot()
@Nullable public @Nullable JavaClass searchJavaClassByOrigFullName(java.lang.String fullName)
@Nullable public @Nullable ClassNode searchClassNodeByOrigFullName(java.lang.String fullName)
@Nullable public @Nullable JavaClass searchJavaClassOrItsParentByOrigFullName(java.lang.String fullName)
@Nullable public @Nullable JavaClass searchJavaClassByAliasFullName(java.lang.String fullName)
@Nullable public @Nullable JavaNode getJavaNodeByRef(ICodeNodeRef ann)
@Nullable public @Nullable JavaNode getJavaNodeByCodeAnnotation(@Nullable @Nullable ICodeInfo codeInfo, @Nullable @Nullable ICodeAnnotation ann)
@Nullable public @Nullable JavaNode getJavaNodeAtPosition(ICodeInfo codeInfo, int pos)
@Nullable public @Nullable JavaNode getClosestJavaNode(ICodeInfo codeInfo, int pos)
public void reloadCodeData()
public JadxArgs getArgs()
public jadx.api.plugins.JadxPluginManager getPluginManager()
public IDecompileScheduler getDecompileScheduler()
public java.lang.String toString()
toString in class java.lang.Object