Languages

Lombok - what is the best way to omit one filed Setter/Getter in Lombok?

8 points
Asked by:
Jax
388

I am looking for the best way to omit one field setter/getter in Lombok.

In my case all getters are defined on the entire class level. I am looking for annotation that is able to disable automatic generating getter and setter only for specific field.

Is it possible?

My source code:

 

1 answer
3 points
Answered by:
Root-ssh
178180

You should add to single field the following annotations:

 

Practical example:

 

See also

  1. Java - omitting one Setter/Getter in Lombok

0 commentsAdd comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join