Skip to content

Commit

Permalink
Don't treat java.lang.Enum subclasses specially.
Browse files Browse the repository at this point in the history
We want the 'public static final' fields to be generated so that our
source generator can emit them; otherwise they're skipped, which makes
for a very confusing binding/usage experience.
  • Loading branch information
jonpryor committed Jan 27, 2012
1 parent 5385fc0 commit 74c27c5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions JavaClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,10 @@ else if (hret != null && !mret.isAssignableFrom (hret)) {
for (String sig : sigs)
appendMethod (methods.get (sig), doc, e);

if (!jclass.isEnum ()) { // enums are somehow skipped.
Field [] fields = getDeclaredFields ();
sortFields (fields);
for (Field field : fields)
appendField (field, asmFields.get (field.getName ()), doc, e);
}
Field [] fields = getDeclaredFields ();
sortFields (fields);
for (Field field : fields)
appendField (field, asmFields.get (field.getName ()), doc, e);
parent.appendChild (e);
}

Expand Down

0 comments on commit 74c27c5

Please sign in to comment.