A library for decompiling Java .class files into .java source code files.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.externalToolBuilders
lib
src/main/java/org/macroing/cel4j/java/decompiler
.classpath
.gitignore
.project
COPYING
COPYING.LESSER
README.md
build.xml

README.md

CEL4J Java Decompiler (v. 0.1.0)

CEL4J Java Decompiler is a library that makes it possible for you to decompile Java .class files into .java source code files.

It's part of the Code Engineering Library for Java (CEL4J) project hosted by Macroing.org.

Examples

import org.macroing.cel4j.java.decompiler.Consumers;
import org.macroing.cel4j.java.decompiler.DecompilationException;
import org.macroing.cel4j.java.decompiler.Decompiler;
import org.macroing.cel4j.java.decompiler.DecompilerObserver;
import org.macroing.cel4j.java.decompiler.simple.SimpleDecompiler;

public class Main {
    public static void main(String[] args) {
        try {
            Class<?> clazz = Integer.class;
            
            Decompiler decompiler = new SimpleDecompiler();
            decompiler.addClass(clazz, Consumers.file("temp", clazz));
            decompiler.addDecompilerObserver(DecompilerObserver.print());
            decompiler.getDecompilerConfiguration().setDisplayingInstructions(true);
            decompiler.decompile();
        } catch(DecompilationException e) {
            e.printStackTrace();
        }
    }
}

Dependencies

Note

This library has not been properly released yet. This means, even though it says it's version 1.0.0 in the build.xml file and all Java source code files, it should not be treated as such. When this library gets released, it will be tagged and available on the "releases" page.