Storing annotations on exception parameters
Jonathan Gibbons
jonathan.gibbons at oracle.com
Tue Jan 22 20:48:03 PST 2013
On 01/22/2013 08:30 PM, Werner Dietl wrote:
> Do you know what operations happen to the exception type between the end of
> com.sun.tools.javac.comp.Attr.attribClassBody
> (where I call TypeAnnotations.organizeTypeAnnotationsBodies and still
> have AnnotatedTypes)
> and Gen.genCatch where I only see unannotated types?
Well, the tree goes through TransTypes and Lower, and in a separate
thread, this morning Maurizio warned of the possibility of losing
annotations during erasure (TransTypes).
And if you follow the supertypes involved in the erasure visitor,
Types.java, 2003
you end up soon enough at the following couple of lines in
Types.defaultTypeVisitor,
round about line 4199:
// Pretend annotations don't exist
public R visitAnnotatedType(AnnotatedType t, S s) { return
visit(t.underlyingType, s); }
-- Jon
More information about the type-annotations-dev
mailing list