You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2017/08/27 08:21:00 UTC

[jira] [Updated] (GROOVY-8300) Groovy should have an @AutoFinal annotation

     [ https://issues.apache.org/jira/browse/GROOVY-8300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King updated GROOVY-8300:
------------------------------
    Description: 
When defined on a method or constructor, all parameters of that method/constructor will be final. When applied on a class, the annotation applies to all methods/constructors.

Still to be determined:
# Should visibility matter, e.g. would it apply to all public, protected, private, etc. members, or does there need to be some ability to customise?
# Should the annotation apply to fields/properties? Applying 'final' to a field/property seems to be more efficient than applying @AutoFinal but would there ever be a desire to apply such an annotation to all fields/properties?

  was:
When defined on a method or constructor, all parameters of that method/constructor will be final. When applied on a class, the annotation applies to all methods/constructors.

Still to be determined:
# Should visibility matter, e.g. would it all to all public, protected, private members, or does there need to be some ability to customise?
# Should the annotation apply to fields/properties? Applying 'final' to a field/property seems to be more efficient than applying @AutoFinal but would there ever be a desire to apply such an annotation to all fields/properties?


> Groovy should have an @AutoFinal annotation
> -------------------------------------------
>
>                 Key: GROOVY-8300
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8300
>             Project: Groovy
>          Issue Type: New Feature
>            Reporter: Paul King
>
> When defined on a method or constructor, all parameters of that method/constructor will be final. When applied on a class, the annotation applies to all methods/constructors.
> Still to be determined:
> # Should visibility matter, e.g. would it apply to all public, protected, private, etc. members, or does there need to be some ability to customise?
> # Should the annotation apply to fields/properties? Applying 'final' to a field/property seems to be more efficient than applying @AutoFinal but would there ever be a desire to apply such an annotation to all fields/properties?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)