Details
Description
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:
class T {
@Readonly thing
}
Which would surpress the generation of the setter that Groovy would ordinarily create.
Issue Links
- is related to
-
GROOVY-4519
Add shorthand syntax for specifying access modifiers for property methods (setters & getters) & fields
-
Is @Readonly the right name? To me that seems close to what final would give you? I suggested @Getter but perhaps there is something better than both.