1.1 --- a/javap/src/main/java/org/apidesign/javap/AnnotationParser.java Fri Nov 16 08:08:36 2012 +0100
1.2 +++ b/javap/src/main/java/org/apidesign/javap/AnnotationParser.java Sun Dec 02 12:26:14 2012 +0100
1.3 @@ -37,7 +37,15 @@
1.4 protected AnnotationParser() {
1.5 }
1.6
1.7 - protected void visitAttr(String type, String attr, String value) {
1.8 + protected void visitAnnotationStart(String type) throws IOException {
1.9 + }
1.10 +
1.11 + protected void visitAnnotationEnd(String type) throws IOException {
1.12 + }
1.13 +
1.14 + protected void visitAttr(
1.15 + String type, String attr, String value
1.16 + ) throws IOException {
1.17 }
1.18
1.19 /** Initialize the parsing with constant pool from <code>cd</code>.
1.20 @@ -66,11 +74,13 @@
1.21 private void readAnno(DataInputStream dis, ClassData cd) throws IOException {
1.22 int type = dis.readUnsignedShort();
1.23 String typeName = cd.StringValue(type);
1.24 + visitAnnotationStart(typeName);
1.25 int cnt = dis.readUnsignedShort();
1.26 for (int i = 0; i < cnt; i++) {
1.27 String attrName = cd.StringValue(dis.readUnsignedShort());
1.28 readValue(dis, cd, typeName, attrName);
1.29 }
1.30 + visitAnnotationEnd(typeName);
1.31 }
1.32
1.33 private void readValue(DataInputStream dis, ClassData cd, String typeName, String attrName)