You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2022/01/03 03:13:00 UTC

[jira] [Updated] (GROOVY-4323) Convention for read only properties.

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

Eric Milles updated GROOVY-4323:
--------------------------------
    Fix Version/s:     (was: 4.x)

> Convention for read only properties.
> ------------------------------------
>
>                 Key: GROOVY-4323
>                 URL: https://issues.apache.org/jira/browse/GROOVY-4323
>             Project: Groovy
>          Issue Type: New Feature
>          Components: syntax
>            Reporter: Luke Daley
>            Priority: Major
>
> Now that Groovy 1.7 enforces field finality, I am missing having a shortcut for readonly fields.
> It would be nice to have something like:
> {code}
> class T {
>     @Readonly thing
> }
> {code}
> Which would surpress the generation of the setter that Groovy would ordinarily create.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)