Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
Description
In Groovy, we're used to define "properties" like so:
class MyParams { @PropertyMandatory String name }
It generates a private field, a getter, and a setter.
But Groovy "puts" the annotation on the private field.
And the macro parameters and their annotations (like @PropertyMandatory) only work on setters and public fields.
So in Groovy, the @PropertyMandatory annotation was simply ignored.
It would be nice if such situations were handled so that idiomatic Groovy can be used.
Remark: suffice to add the public keyword to create a public field, so it's an okay workaround.