need better printer
Werner Dietl
wdietl at gmail.com
Thu Jan 24 19:32:37 PST 2013
Also note that that rudimentary logic is duplicated in
com.sun.tools.javac.code.Printer.visitAnnotatedType.
Can we just use the Printer?
This also depends on whether we go with delegation or anon subtypes
for AnnotatedType.
cu, WMD.
On Thu, Jan 24, 2013 at 5:01 PM, Jonathan Gibbons
<jonathan.gibbons at oracle.com> wrote:
> 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
--
http://www.google.com/profiles/wdietl
More information about the type-annotations-dev
mailing list