Generation of synthesized parameters
Remi Forax
forax at univ-mlv.fr
Tue Jan 29 13:41:35 PST 2013
On 01/29/2013 08:53 PM, 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
>> 2) extra values passed to constructor for enum values
>> 3) hidden values passed to constructors of inner classes for final
>> variables
>> 4) JLS mandated public no-arg constructors added by the compiler to
>> classes with no declared constructor: synthesized
>> 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
>
> See attached test file.
>
> -- Jon
and what about bridges, should their parameter are synthetized or not ?
class A {
private static class B { // two consructors here, one is a bridges
}
public void main(String[] args) {
new B();
}
}
Rémi
More information about the compiler-dev
mailing list