Hi Darren,
I agree, fluent setters may be useful. I've thought about this before, but stumbled upon the following caveats:
- Generating additional setters (using "with" or no prefix) will lead to a variety of changes also to the GeneratorStrategy, where "fluent" setters would have to be handled in addition to "regular" setters.
- The GeneratorStrategy itself cannot be used. While it can be used to rename the prefix from "set" to "with", the method still returns void
But you do have a simpler option, if you're fine with having setters *and* fluent setters. You can override the JavaGenerator's generatePojoClassFooter() method. This is documented here:
That might be good enough as a solution for this specific requirement?
Cheers
Lukas