[ https://issues.apache.org/jira/browse/GROOVY-4323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15006403#comment-15006403 ]
Christopher Smith commented on GROOVY-4323: ------------------------------------------- There's a difference between a read-only and a final property. As a specific example, I'm working with JPA {{@Version}} fields, which are managed entirely by the persistence provider and should not be diddled by user code, but which user code might be interested in reading (especially when the version is a timestamp). I would still like to have a mechanism for handling this. > 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 > Fix For: 4.0 > > > 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 (v6.3.4#6332)