Generation of synthesized parameters

Jonathan Gibbons jonathan.gibbons at oracle.com
Tue Jan 29 11:52:19 PST 2013


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
2 and 5 appear to be duplicates

-- Jon



More information about the compiler-dev mailing list