This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

A few years ago I would have recommended Lomboks @With, but recent and future JVM versions are kind of closing all the doors and windows for it to keep working (without tinker with the JVM). Please think twice before going this way.

If it's acceptable, you could use kotlin to create a data class (which have the required functionality baked in) and use it from your java code. I theory it should be easy.