javap/src/main/java/org/apidesign/javap/AnnotationParser.java
branchreflection
changeset 655 044c72732424
parent 653 bcdfc29fd004
child 659 7c0eb1a5d0b8
     1.1 --- a/javap/src/main/java/org/apidesign/javap/AnnotationParser.java	Sun Feb 03 19:39:34 2013 +0100
     1.2 +++ b/javap/src/main/java/org/apidesign/javap/AnnotationParser.java	Sun Feb 03 23:18:47 2013 +0100
     1.3 @@ -60,6 +60,12 @@
     1.4      ) throws IOException {
     1.5      }
     1.6      
     1.7 +    protected void visitEnumAttr(
     1.8 +        String annoType, String attr, String attrType, String value
     1.9 +    ) throws IOException {
    1.10 +        visitAttr(annoType, attr, attrType, value);
    1.11 +    }
    1.12 +    
    1.13      /** Initialize the parsing with constant pool from <code>cd</code>.
    1.14       * 
    1.15       * @param attr the attribute defining annotations
    1.16 @@ -130,10 +136,7 @@
    1.17              String attrType = cd.stringValue(enumT, textual);
    1.18              int enumN = dis.readUnsignedShort();
    1.19              String val = cd.stringValue(enumN, textual);
    1.20 -            if (textual) {
    1.21 -                val = "vm." + attrType.substring(1, attrType.length() - 1).replace('/', '_') + "(false).constructor." + val;
    1.22 -            }
    1.23 -            visitAttr(typeName, attrName, attrType, val);
    1.24 +            visitEnumAttr(typeName, attrName, attrType, val);
    1.25          } else {
    1.26              throw new IOException("Unknown type " + type);
    1.27          }