diff -r 77f7135b6eb1 -r bf0a77f029c4 javap/src/main/java/org/apidesign/javap/AnnotationParser.java --- a/javap/src/main/java/org/apidesign/javap/AnnotationParser.java Fri Nov 16 08:08:36 2012 +0100 +++ b/javap/src/main/java/org/apidesign/javap/AnnotationParser.java Sun Dec 02 12:26:14 2012 +0100 @@ -37,7 +37,15 @@ protected AnnotationParser() { } - protected void visitAttr(String type, String attr, String value) { + protected void visitAnnotationStart(String type) throws IOException { + } + + protected void visitAnnotationEnd(String type) throws IOException { + } + + protected void visitAttr( + String type, String attr, String value + ) throws IOException { } /** Initialize the parsing with constant pool from cd. @@ -66,11 +74,13 @@ private void readAnno(DataInputStream dis, ClassData cd) throws IOException { int type = dis.readUnsignedShort(); String typeName = cd.StringValue(type); + visitAnnotationStart(typeName); int cnt = dis.readUnsignedShort(); for (int i = 0; i < cnt; i++) { String attrName = cd.StringValue(dis.readUnsignedShort()); readValue(dis, cd, typeName, attrName); } + visitAnnotationEnd(typeName); } private void readValue(DataInputStream dis, ClassData cd, String typeName, String attrName)