Skip to content

Instantly share code, notes, and snippets.

@schwarzeszeux
Created April 9, 2012 22:35
Show Gist options
  • Save schwarzeszeux/2347102 to your computer and use it in GitHub Desktop.
Save schwarzeszeux/2347102 to your computer and use it in GitHub Desktop.
Enum decompilation
package Enums;
public enum TestEnum {
WHITE("WHITE", 0),
BLACK("BLACK", 1),
RED("RED", 2),
YELLOW("YELLOW", 3),
BLUE("BLUE", 4);
// $FF: synthetic field
private static final TestEnum[] ENUM$VALUES = new TestEnum[]{WHITE, BLACK, RED, YELLOW, BLUE};
private TestEnum(String var1, int var2) {}
}
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: TestEnum.java
package Enums;
public final class TestEnum extends Enum
{
private TestEnum(String s, int i)
{
super(s, i);
}
public static TestEnum[] values()
{
TestEnum atestenum[];
int i;
TestEnum atestenum1[];
System.arraycopy(atestenum = ENUM$VALUES, 0, atestenum1 = new TestEnum[i = atestenum.length], 0, i);
return atestenum1;
}
public static TestEnum valueOf(String s)
{
return (TestEnum)Enum.valueOf(Enums/TestEnum, s);
}
public static final TestEnum WHITE;
public static final TestEnum BLACK;
public static final TestEnum RED;
public static final TestEnum YELLOW;
public static final TestEnum BLUE;
private static final TestEnum ENUM$VALUES[];
static
{
WHITE = new TestEnum("WHITE", 0);
BLACK = new TestEnum("BLACK", 1);
RED = new TestEnum("RED", 2);
YELLOW = new TestEnum("YELLOW", 3);
BLUE = new TestEnum("BLUE", 4);
ENUM$VALUES = (new TestEnum[] {
WHITE, BLACK, RED, YELLOW, BLUE
});
}
}
package Enums;
public enum TestEnum
{
WHITE,
BLACK,
RED,
YELLOW,
BLUE;
}
package Enums;
public enum TestEnum {
WHITE, BLACK, RED, YELLOW, BLUE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment