reducing use of TypeAnnotations constructor

Jonathan Gibbons jonathan.gibbons at oracle.com
Mon Aug 26 19:23:49 PDT 2013


Werner,

As you know, we're looking to improve the representation of annotated 
types in javac, perhaps by replacing AnnotatedType, in order to reduce 
"those pesky calls of unannotatedType".

I've attached a patch for your consideration to replace direct use of 
the AnnotatedType constructor with a factory method on the underlying 
type to be annotated.

This isn't the whole story about replacing AnnotatedType: just think of 
it as clearing out the easy bits first.  I do feel this is a step in the 
right direction, and will allow us to focus on the remaining uses of 
AnnotatedType.  As such, I may push this to TL soon enough, but you 
might want to preview it in the type-annotations forest before then.

And, if you're interested, I'd be interested to hear any suggestions you 
may have on further reducing direct use of the TypeAnnotations type, by 
replacing such usages with virtual methods on Type, with appropriate 
impls in Type and AnnotatedType.

-- Jon




-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8023772.patch
Type: text/x-patch
Size: 7880 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/type-annotations-dev/attachments/20130826/92bf599b/8023772.patch 


More information about the type-annotations-dev mailing list