Interface Decompiler

    • Method Detail

      • 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