Re:Data Classes for Java
by zmmmmm on Thursday November 02, 2017 @06:10AM
(#15609090)
> Though I haven't used Groovy much I like their approach to this
I like this a lot about Groovy as well. Groovy also provides annotations that relieve a lot of the other points too, such as @Immutable [1], @EqualsAndHashcode [2] and @ToString. It even supports meta-annotations which let you alias several annotations together as one so you can make a complete "data class" with a single annotation.
I like this a lot about Groovy as well. Groovy also provides annotations that relieve a lot of the other points too, such as @Immutable [1], @EqualsAndHashcode [2] and @ToString. It even supports meta-annotations which let you alias several annotations together as one so you can make a complete "data class" with a single annotation.
[1] http://docs.groovy-lang.org/latest/html/gapi/groovy/transfor...
[2] http://docs.groovy-lang.org/latest/html/gapi/groovy/transfor...