编译前:
package Enum_exercise; //枚举中的构造器默认是私有 public enum EnumDemo { Mon,Tue,Wed,Thu,Fri,Sat,Sun; }
反编译后:
// 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: EnumDemo.java package Enum_exercise; public final class EnumDemo extends Enum { private EnumDemo(String s, int i) { super(s, i); } public static EnumDemo[] values() { EnumDemo aenumdemo[]; int i; EnumDemo aenumdemo1[]; System.arraycopy(aenumdemo = ENUM$VALUES, 0, aenumdemo1 = new EnumDemo[i = aenumdemo.length], 0, i); return aenumdemo1; } public static EnumDemo valueOf(String s) { return (EnumDemo)Enum.valueOf(Enum_exercise/EnumDemo, s); } public static final EnumDemo Mon; public static final EnumDemo Tue; public static final EnumDemo Wed; public static final EnumDemo Thu; public static final EnumDemo Fri; public static final EnumDemo Sat; public static final EnumDemo Sun; private static final EnumDemo ENUM$VALUES[]; static { Mon = new EnumDemo("Mon", 0); Tue = new EnumDemo("Tue", 1); Wed = new EnumDemo("Wed", 2); Thu = new EnumDemo("Thu", 3); Fri = new EnumDemo("Fri", 4); Sat = new EnumDemo("Sat", 5); Sun = new EnumDemo("Sun", 6); ENUM$VALUES = (new EnumDemo[] { Mon, Tue, Wed, Thu, Fri, Sat, Sun }); } }