need better printer
Jonathan Gibbons
jonathan.gibbons at oracle.com
Thu Jan 24 17:01:39 PST 2013
Werner,
The following code in com.sun.tools.javac.code.Printer needs to be fixed
to render the annotation in JLS format, since the text can appear in
diagnostic messages;
@Override
public String visitAnnotatedType(AnnotatedType t, Locale locale) {
if (t.typeAnnotations != null &&
t.typeAnnotations.nonEmpty()) {
// TODO: better logic for arrays, ...
return "(" + t.typeAnnotations + " :: " +
visit(t.underlyingType, locale) + ")";
} else {
return "({} :: " + visit(t.underlyingType, locale) + ")";
}
}
Separately, I am working on better printers for debugging.
-- Jon
More information about the type-annotations-dev
mailing list