RFR: 8004699 : Add type annotation storage to Constructor, Field and Method

David Holmes david.holmes at oracle.com
Tue Dec 18 01:58:35 UTC 2012


On 18/12/2012 3:06 AM, Joel Borggrén-Franck wrote:
>
> On Dec 17, 2012, at 5:00 PM, Peter Levart<peter.levart at gmail.com>  wrote:
>
>> Hi Joel,
>>
>>   82     // This is set by the vm at Method creation
>>   83     private byte[]              type_annotations;
>>
>>
>> Wouldn't it be better to initialize this field in the constructor? You could create an overloaded constructor if you wanted to be compatible with previous versions of the VM.
>>
>
> Fields aren't created using a constructor as far as I can see.

Correct, all the reflection objects are allocated directly by the VM and 
initialized field by field as needed. No Java level constructor involved.

This change is also fine with me, on the proviso that the follow up 
change to deal with efficiency and the field name is not too far away. 
Though really I don't think the change of name will be that big a deal 
anyway.

Cheers,
David

> cheers
> /Joel



More information about the core-libs-dev mailing list