@Data is too encompassing; a way to generate just equals/hashCode and just toString also needed. #81

lombokissues opened this Issue Jul 14, 2015 · 4 comments


None yet

1 participant


Migrated from Google Code (issue 8)


👤 reinierz   🕗 Jul 26, 2009 at 08:13 UTC

Parameters for equals/hashCode and toString generation can then also be created, on newly
created annotations for generating just those method(s).

For equals/hashCode:

'call super.hashCode / super.equals first' (incl check on whether you extend something other
than java.lang.Object if you enable this), a way to exclude fields, or include transient fields.

For toString: exclude fields option, as well as a 'long form' option that prefixes each printed field
with that field's name.

Right now classes which really don't warrant a @ Data will nevertheless be tagged with it just
because people want to avoid having to roll their own equals/hashCode.


👤 reinierz   🕗 Jul 27, 2009 at 07:22 UTC

@ ToString has been split off in commit d906899


👤 reinierz   🕗 Jul 27, 2009 at 09:05 UTC

And @ EqualsAndHashCode has been split off in commit 8fbcf8f

which finishes this issue. It will have been added in v0.8.2.


End of migration

@Tradunsky Tradunsky pushed a commit to Tradunsky/lombok that referenced this issue Aug 19, 2015
Michail Plushnikov fixed #81 @Builder: buildMethod should have same throws-list as annot…
…ated static method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment