Class AbstractDecompiler
- java.lang.Object
-
- org.jboss.windup.decompiler.decompiler.AbstractDecompiler
-
- All Implemented Interfaces:
Decompiler
public abstract class AbstractDecompiler extends Object implements Decompiler
An abstract class encapsulating the common logic from theDecompilerimplementations.- Author:
- Matej Briskar
-
-
Constructor Summary
Constructors Constructor Description AbstractDecompiler()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.windup.decompiler.api.Decompiler
decompileClassFile
-
-
-
-
Method Detail
-
getLogger
public abstract Logger getLogger()
-
setExecutorService
public void setExecutorService(ExecutorService service, int numberOfThreads)
-
groupDecompileRequests
protected Map<String,List<ClassDecompileRequest>> groupDecompileRequests(Collection<ClassDecompileRequest> requests)
-
getDecompileTasks
public abstract Collection<Callable<File>> getDecompileTasks(Map<String,List<ClassDecompileRequest>> requestMap, DecompilationListener listener)
-
decompileClassFiles
public void decompileClassFiles(Collection<ClassDecompileRequest> requests, DecompilationListener listener)
Description copied from interface:DecompilerDecompiles the given batch of ".class" files.- Specified by:
decompileClassFilesin interfaceDecompiler
-
close
public void close()
Description copied from interface:DecompilerClose all the resources- Specified by:
closein interfaceDecompiler
-
decompileArchive
public 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.
- Specified by:
decompileArchivein interfaceDecompiler- 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
public DecompilationResult decompileArchive(Path archive, Path outputDir, Filter<ZipEntry> filter, DecompilationListener listener) throws DecompilationException
Description copied from interface:DecompilerDecompiles 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.
- Specified by:
decompileArchivein interfaceDecompiler- 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
-
decompileArchiveImpl
public abstract DecompilationResult decompileArchiveImpl(Path archive, Path outputDir, Filter<ZipEntry> filter, DecompilationListener listener)
-
getExecutorService
public ExecutorService getExecutorService()
-
getNumberOfThreads
public int getNumberOfThreads()
-
-