Skip to content

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

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

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

Comments

@lombokissues
Copy link

Migrated from Google Code (issue 8)

@lombokissues
Copy link
Author

👤 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
Copy link
Author

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

@ ToString has been split off in commit d906899

@lombokissues
Copy link
Author

👤 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
Copy link
Author

End of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant