test failures
Jonathan Gibbons
jonathan.gibbons at oracle.com
Mon Jan 21 10:25:07 PST 2013
Werner,
Once the webrev comes in from Joel, I'm hoping we can both
jump on it and put it through its paces.
My hope is that if we can pull this off, we won't disturb the underlying
javac Type model.
-- Jon
On 01/21/2013 10:17 AM, Werner Dietl wrote:
> Jon, Joel,
>
> thanks for looking into this alternative!
> I'm curious how this will look. Let me know how I can help.
>
> cu, WMD.
>
> On Mon, Jan 21, 2013 at 8:29 AM, Jonathan Gibbons
> <jonathan.gibbons at oracle.com> wrote:
>> On 01/18/2013 05:28 PM, Werner Dietl wrote:
>>> I tried integrating AnnotatedType more widely, but am running into
>>> problems. I think it would be best if somebody more familiar with
>>> XXXType and type resolution takes a closer look.
>>
>> Werner,
>>
>> Joel and I had a discussion on this, earlier this morning.
>>
>> We believe that we can get away without using the delegation model
>> of AnnotatedType, and can instead use the anonymous subtype model
>> used by javac.code.Type.constType(). In other words, the proposal
>> is to put a method called annotatedType(??) on Type, where ?? stands
>> for the annotations to be added. This will return a new Type such that
>> Type.getAnnotations will return the appropriate list. The default impl
>> of Type.getAnnotations will return an empty list.
>>
>> This approach should integrate better into the existing type system,
>> as no new TypeKinds are added -- we just use anonymous subtypes
>> of existing types to override default "return empty list" impls.
>>
>> Joel has said he will try and have a patch for this by the end of today
>> (his time). We agreed he would be a good person to work on this
>> because he also understands the requirements of the javax.lang.model
>> API and can take that into account here.
>>
>> The only (minor) complexity with this approach is that the same technique
>> of anonymous subtypes is also used for constant values. But, our sense
>> is that the complexity is manageable, and less than I initially feared,
>> since
>> most types do not support constant values anyway.
>>
>> -- Jon
>
>
More information about the type-annotations-dev
mailing list