I am trying to use lombok getters and seters annotations. As far as I know, annotated code is generated at runtime, not compilation time, and how can I use auto-generated getters and setters to write code?
for example i have a class like this
@lombok.Getters @lombok.Setters public class MyLombokTesting { private String userName; }
but what is the use of annotations if they are not generated when writing code ...
Now i want to do something like this
MyLombokTesting myLombokTesting = new MyLombokTesting(); String username = myLombokTesting.getUserName(); or myLombokTesting.setUserName("some username");
but I canβt do any of them, because during the eclipse during writing the code, setters and getters were not created for me.
Obviously, I can have one argument constructor to set the username, but what about getter?
source share