diff -r 044c72732424 -r 7c0eb1a5d0b8 vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java --- a/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java Sun Feb 03 23:18:47 2013 +0100 +++ b/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java Mon Feb 04 22:03:49 2013 +0100 @@ -1705,16 +1705,22 @@ int depth; @Override - protected void visitAnnotationStart(String type) throws IOException { + protected void visitAnnotationStart(String attrType, boolean top) throws IOException { + final String slashType = attrType.substring(1, attrType.length() - 1); + requireReference(slashType); + if (cnt[depth]++ > 0) { out.append(","); } - out.append('"').append(type).append("\" : {\n"); + if (top) { + out.append('"').append(attrType).append("\" : "); + } + out.append("{\n"); cnt[++depth] = 0; } @Override - protected void visitAnnotationEnd(String type) throws IOException { + protected void visitAnnotationEnd(String type, boolean top) throws IOException { out.append("\n}\n"); depth--; }