Resolve static enum members from compiled Java

For static members, a corresponding package is now created for every enum, as
it's done for every other class. All static members of enum classes are
resolved into the package, EXCEPT its enum entries, valueOf() and values()
methods, which are put into the enum's class descriptor.
This commit is contained in:
Alexander Udalov
2013-03-14 18:52:14 +04:00
parent 68844131b0
commit 7368ca09b9
8 changed files with 80 additions and 13 deletions
@@ -0,0 +1,12 @@
package test;
public enum StaticMembersInEnum {
ENTRY;
public static void foo() { }
public static void values(int x) { }
public static void valueOf(int x) { }
public static int STATIC_FIELD = 42;
public static final StaticMembersInEnum CONSTANT = ENTRY;
}