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

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

Closed
lombokissues opened this Issue Jul 14, 2015 · 4 comments

Comments

Projects
None yet
1 participant
@lombokissues
Collaborator

lombokissues commented Jul 14, 2015

Migrated from Google Code (issue 8)

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 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.

Collaborator

lombokissues commented Jul 14, 2015

👤 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.

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

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

@ ToString has been split off in commit d906899

Collaborator

lombokissues commented Jul 14, 2015

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

@ ToString has been split off in commit d906899

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

👤 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.

Collaborator

lombokissues commented Jul 14, 2015

👤 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.

@lombokissues

This comment has been minimized.

Show comment
Hide comment
@lombokissues

lombokissues Jul 14, 2015

Collaborator

End of migration

Collaborator

lombokissues commented Jul 14, 2015

End of migration

Tradunsky pushed a commit to Tradunsky/lombok that referenced this issue Aug 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment