diff -r d97770281580 -r 84ffc347412d javap/src/main/java/org/apidesign/javap/AnnotationParser.java --- a/javap/src/main/java/org/apidesign/javap/AnnotationParser.java Sun Dec 02 12:39:51 2012 +0100 +++ b/javap/src/main/java/org/apidesign/javap/AnnotationParser.java Sun Dec 02 14:01:17 2012 +0100 @@ -34,7 +34,10 @@ * @author Jaroslav Tulach */ public class AnnotationParser { - protected AnnotationParser() { + private final boolean textual; + + protected AnnotationParser(boolean textual) { + this.textual = textual; } protected void visitAnnotationStart(String type) throws IOException { @@ -90,13 +93,17 @@ readAnno(dis, cd); } else if ("CFJZsSIDB".indexOf(type) >= 0) { // NOI18N int primitive = dis.readUnsignedShort(); + String val = cd.stringValue(primitive, textual); String attrType; if (type == 's') { attrType = "Ljava_lang_String"; + if (textual) { + val = '"' + val + '"'; + } } else { attrType = "" + type; } - visitAttr(typeName, attrName, attrType, cd.StringValue(primitive)); + visitAttr(typeName, attrName, attrType, val); } else if (type == 'c') { int cls = dis.readUnsignedShort(); } else if (type == '[') {