-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More fine grained control over constructors #152
Comments
👤 scharlip 🕗 Dec 07, 2009 at 16:54 UTC As far as I can tell, lombok will only generate a single constructor for a I would love a way to be able to generate this constructor as well as a Right now, I have a lot of boilerplate code that looks like this: @ Data
} I have to write both, because lombok only wants to generate one constructor I'd love to be able to have lombok generate the constructor code for me: @ Data(extraNoArgumentConstructor=true) Lombok is great. Keep up the good work! |
👤 reinierz 🕗 Jul 19, 2010 at 15:00 UTC We'll like tackle this for the 0.9.3 release. Link to the discussion on the googlegroups: http://groups.google.com/group/project-lombok/browse_thread/thread/553c771b5006e18f﹟ |
👤 reinierz 🕗 Jul 19, 2010 at 20:01 UTC Issue #181 has been merged into this issue. |
👤 reinierz 🕗 Jul 19, 2010 at 20:14 UTC We've now added this to lombok 0.9.3 (Burrowing Whale). We still have to update the site documentation, but, in short: @ NoArgsConstructor will generate no args constructor (and error out if that's not possible due to final fields), required args constructor (all final fields and all fields with constraints such as @ NonNull - this is what @ Data does by default), and a constructor for ALL fields. You can choose the access level (public by default) for any of them, and you can turn any of them into a static constructor via the staticName annotation argument. You can play with this feature by installing the edge release of Burrowing Whale, available here: https://projectlombok.org/download-edge.html Leaving this issue open until we update the docs. Done in commit 067ecf7 |
👤 reinierz 🕗 Jul 20, 2010 at 05:44 UTC Docs have been updated in aaf8547 |
End of migration |
Migrated from Google Code (issue 79)
The text was updated successfully, but these errors were encountered: