RFR(13): JDK-8217047: Provide a way to inject missing parameter names

Joseph D. Darcy joe.darcy at oracle.com
Wed Jan 30 01:07:59 UTC 2019

Hi Jan,

I think this is a reasonable capability to provide in the platform, 
especially if a "do what I'm most likely to want" provider is included.



On 1/21/2019 4:32 AM, Jan Lahoda wrote:
> Hi,
> When a type is load from a classfile, and some or all of its methods 
> have neither the MethodParameters or LocalVariableTable attributes, 
> then the parameters of the methods have an artificial synthesized 
> name, which is visible through VariableElement.getSimpleName().
> The proposal here is to allow to plug in an external provider that 
> could provide more user-friendly names lazily/on demand. These could 
> originate e.g. in adjacent sources.
> JBS: https://bugs.openjdk.java.net/browse/JDK-8217437
> Webrev: http://cr.openjdk.java.net/~jlahoda/8217047/webrev.01/
> Specdiff: 
> http://cr.openjdk.java.net/~jlahoda/8217047/specdiff.01/overview-summary.html
> CSR: https://bugs.openjdk.java.net/browse/JDK-8217437
> What do you think?
> Thanks,
>     Jan

More information about the compiler-dev mailing list