Package org.jboss.windup.decompiler.api
Interface Decompiler
-
- All Known Implementing Classes:
AbstractDecompiler
public interface DecompilerUsed to decompile Java .class files and archives.- Author:
- Ondrej Zizka, Lincoln Baxter, III
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close all the resourcesDecompilationResultdecompileArchive(Path archive, Path outputDir, DecompilationListener listener)Decompiles all .class files and nested archives in the given archive.DecompilationResultdecompileArchive(Path archive, Path outputDir, Filter<ZipEntry> filter, DecompilationListener listener)Decompiles all .class files and nested archives in the given archive.DecompilationResultdecompileClassFile(Path rootDir, Path classFilePath, Path outputDir)Decompiles the given .class file and creates the specified output source file in the given output dir under appropriate package subdirectories, like $outputDir/org/jboss/Foo.java.voiddecompileClassFiles(Collection<ClassDecompileRequest> requests, DecompilationListener listener)Decompiles the given batch of ".class" files.
-
-
-
Method Detail
-
decompileClassFiles
void decompileClassFiles(Collection<ClassDecompileRequest> requests, DecompilationListener listener)
Decompiles the given batch of ".class" files.
-
decompileClassFile
DecompilationResult decompileClassFile(Path rootDir, Path classFilePath, Path outputDir) throws DecompilationException
Decompiles the given .class file and creates the specified output source file in the given output dir under appropriate package subdirectories, like $outputDir/org/jboss/Foo.java. Decompilation may need multiple .class files for one .java file, e.g. for inner classes.- Parameters:
classFilePath- the .class file to be decompiled.outputDir- The directory where decompiled .java files will be placed.- Throws:
DecompilationException
-
close
void close()
Close all the resources
-
decompileArchive
DecompilationResult decompileArchive(Path archive, Path outputDir, DecompilationListener listener) throws DecompilationException
Decompiles all .class files and nested archives in the given archive.Nested archives will be decompiled into directories matching the name of the archive, e.g.
foo.ear/bar.jar/src/com/foo/bar/Baz.java.Required directories will be created as needed.
- Parameters:
archive- The archive containing source files and archives.outputDir- The directory where decompiled .java files will be placed.listener- This is called after each successful decompilation- Throws:
DecompilationException
-
decompileArchive
DecompilationResult decompileArchive(Path archive, Path outputDir, Filter<ZipEntry> filter, DecompilationListener listener) throws DecompilationException
Decompiles all .class files and nested archives in the given archive.Nested archives will be decompiled into directories matching the name of the archive, e.g.
foo.ear/bar.jar/src/com/foo/bar/Baz.java.Required directories will be created as needed.
- Parameters:
archive- The archive containing source files and archives.outputDir- The directory where decompiled .java files will be placed.filter- Decides what files from the archive to decompile.listener- This is called after each successful decompilation- Throws:
DecompilationException
-
-