1.1 --- a/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java Sun Feb 03 22:58:42 2013 +0100
1.2 +++ b/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java Sun Feb 03 23:18:47 2013 +0100
1.3 @@ -1699,7 +1699,7 @@
1.4 return " = null;";
1.5 }
1.6
1.7 - private static void generateAnno(ClassData cd, final Appendable out, byte[] data) throws IOException {
1.8 + private void generateAnno(ClassData cd, final Appendable out, byte[] data) throws IOException {
1.9 AnnotationParser ap = new AnnotationParser(true, false) {
1.10 int[] cnt = new int[32];
1.11 int depth;
1.12 @@ -1749,6 +1749,16 @@
1.13 }
1.14 out.append(value);
1.15 }
1.16 +
1.17 + @Override
1.18 + protected void visitEnumAttr(String type, String attr, String attrType, String value)
1.19 + throws IOException {
1.20 + final String slashType = attrType.substring(1, attrType.length() - 1);
1.21 + requireReference(slashType);
1.22 +
1.23 + out.append(accessClass(slashType.replace('/', '_')))
1.24 + .append("(false).constructor.").append(value);
1.25 + }
1.26 };
1.27 ap.parse(data, cd);
1.28 }