Ask Your Question
4

Is it possible to omit specific fields from the @Data annotation provided by Lombok?

asked 2022-02-28 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-06-11 08:00:00 +0000

david gravatar image

Yes, it is possible to omit specific fields from the @Data annotation provided by Lombok. You can use other annotations provided by Lombok such as @Getter and @Setter to generate getters and setters for specific fields. Additionally, you can use the @ToString and @EqualsAndHashCode annotations to generate the toString() and equals() methods respectively without including specific fields.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-02-28 11:00:00 +0000

Seen: 2 times

Last updated: Jun 11 '22