diff -r 044c72732424 -r 7c0eb1a5d0b8 javap/src/main/java/org/apidesign/javap/AnnotationParser.java --- a/javap/src/main/java/org/apidesign/javap/AnnotationParser.java Sun Feb 03 23:18:47 2013 +0100 +++ b/javap/src/main/java/org/apidesign/javap/AnnotationParser.java Mon Feb 04 22:03:49 2013 +0100 @@ -42,10 +42,10 @@ this.iterateArray = iterateArray; } - protected void visitAnnotationStart(String type) throws IOException { + protected void visitAnnotationStart(String type, boolean top) throws IOException { } - protected void visitAnnotationEnd(String type) throws IOException { + protected void visitAnnotationEnd(String type, boolean top) throws IOException { } protected void visitValueStart(String attrName, char type) throws IOException { @@ -85,20 +85,20 @@ private void read(DataInputStream dis, ClassData cd) throws IOException { int cnt = dis.readUnsignedShort(); for (int i = 0; i < cnt; i++) { - readAnno(dis, cd); + readAnno(dis, cd, true); } } - private void readAnno(DataInputStream dis, ClassData cd) throws IOException { + private void readAnno(DataInputStream dis, ClassData cd, boolean top) throws IOException { int type = dis.readUnsignedShort(); String typeName = cd.StringValue(type); - visitAnnotationStart(typeName); + visitAnnotationStart(typeName, top); int cnt = dis.readUnsignedShort(); for (int i = 0; i < cnt; i++) { String attrName = cd.StringValue(dis.readUnsignedShort()); readValue(dis, cd, typeName, attrName); } - visitAnnotationEnd(typeName); + visitAnnotationEnd(typeName, top); if (cnt == 0) { visitAttr(typeName, null, null, null); } @@ -110,7 +110,7 @@ char type = (char)dis.readByte(); visitValueStart(attrName, type); if (type == '@') { - readAnno(dis, cd); + readAnno(dis, cd, false); } else if ("CFJZsSIDB".indexOf(type) >= 0) { // NOI18N int primitive = dis.readUnsignedShort(); String val = cd.stringValue(primitive, textual);