Generation of synthesized parameters

Eric McCorkle eric.mccorkle at oracle.com
Tue Jan 29 14:02:30 PST 2013


Thanks, Peter.  The tests are a major help!

On 01/29/13 16:36, Peter Jensen wrote:
> On 01/29/13 11:52, Jonathan Gibbons wrote:
>> On 01/29/2013 11:40 AM, Eric McCorkle wrote:
>>> In order to facilitate writing tests for the MethodParameters feature,
>>> I'd like to get a complete list of all the cases when javac can generate
>>> synthesized parameters.
>>>
>>> Here is a list I've put together from email discussions and comments
>>> in JBS:
>>>
>>> 1) outer "this" parameters
> My tests assumes this for anon inner classes, local classes and
> non-static member classes.
> 
>>> 2) extra values passed to constructor for enum values
> Test assume two first arguments are synthesized.
> 
>>> 3) hidden values passed to constructors of inner classes for final
>>> variables
> I forgot about this. The current test-cases do cover the case of final
> variable references.
> 
>>> 4) JLS mandated public no-arg constructors added by the compiler to
>>> classes with no declared constructor: synthesized
> For constructors I assume the only synthesized arguments are the one
> mentioned above.
> This should be true for synthesized constructors as well, since they do
> not have any user declared constructors.
> 
>>> 5) The two parameters pre-ended to enum constructors by javac
>>>
>>>
>>> Does this capture everything, or does it miss something?
>>>
>>> Ideally, I would like to put together a complete list of all cases that
>>> should generate synthesized parameters.  (If one already exists, then
>>> that's great).
>>>
>>> Thanks,
>>> Eric
>> 2 and 5 appear to be duplicates
>>
>> -- Jon
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eric_mccorkle.vcf
Type: text/x-vcard
Size: 314 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20130129/ac1942b3/eric_mccorkle.vcf 


More information about the compiler-dev mailing list