Search code examples
javaenumsdecompiling

Decompiling Java: Using JD I get an empty enum class


I have decompiled a set of classes using JD.

In one of the classes there is a reference to a public field in a class. I open the class with the mentioned field. Imagine my surprise when I came across this:

public enum agw
{
}

I've come to the conclusion that the decompiler doesn't successfully decompile some kind of class type, possibly enums. I have come across a few of these.

Another example:

public enum acf
{
  private final Class d;
  private final int e;
  private final acn f;
  private final boolean g;

  private acf(Class paramacn, int paramBoolean, acn arg5, boolean arg6)
  {
    d = paramacn;
    e = paramBoolean;
    Object localObject;
    f = localObject;
    boolean bool;
    g = bool;
  }

  public Class a() {
    return d;
  }

  public int b() {
    return e;
  }

  public acn c() {
    return f;
  }

  public boolean d() {
    return g;
  }
}

Does anyone know what these classes are supposed to be? What they could have represented in their original form?

Thanks.


Solution

  • Well, I believe this would actually be expected behavior because jad only supports (properly) Java versions up to 1.4. Enumerations were introduced in Java 1.5. This could explain things.