From 74c27c571ee073f6c9632fa37f38f4c769689542 Mon Sep 17 00:00:00 2001 From: Jonathan Pryor Date: Fri, 27 Jan 2012 09:32:23 -0500 Subject: [PATCH] Don't treat java.lang.Enum subclasses specially. 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. --- JavaClass.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/JavaClass.java b/JavaClass.java index 00460d4..52108cb 100644 --- a/JavaClass.java +++ b/JavaClass.java @@ -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); }