You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Nick Grealy (JIRA)" <ji...@apache.org> on 2015/05/13 13:27:59 UTC

[jira] [Commented] (GROOVY-7423) Access to Method parameter names at runtime

    [ https://issues.apache.org/jira/browse/GROOVY-7423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14541746#comment-14541746 ] 

Nick Grealy commented on GROOVY-7423:
-------------------------------------

I've created a pull request, which implements this feature: https://github.com/apache/incubator-groovy/pull/15

Configuration is similar to the javac -parameters parameter...

It can be enabled by passing -pa or --parameters to the groovy or groovyc executables, or alternatively, you can set the -Dparameters system property.

Happy to have feedback on changes/suggestions. Thanks to @blackdrag for showing me where to get started!

> Access to Method parameter names at runtime
> -------------------------------------------
>
>                 Key: GROOVY-7423
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7423
>             Project: Groovy
>          Issue Type: Improvement
>          Components: ast builder, command line processing, Compiler, groovy-runtime
>            Reporter: Nick Grealy
>            Assignee: Guillaume Laforge
>              Labels: easyfix, features
>             Fix For: 2.2.3
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Given that JDK8 now supports accessing parameter names at runtime
> <http://openjdk.java.net/jeps/118>, I'd like to incorporate this behaviour
> into the Groovy compiler.
> I'm proposing adding a command line/configuration change to the groovyc
> compiler, to add reflective information to the compiled bytecode (i.e. the
> parameter names).
> I'm not proposing any changes to the current behaviour of method invocation
> (using named parameters).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)