I am trying to use lombok getters and setters annotations. As far as I know the annotated code is generated at runtime and not compile time so how can take the help of autogenerated getters and setters for writing 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 such annotations if these are not generated while 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 these since there are no setters and getters generated for me in eclipse while writing code..
Obviously I can have a one argument constructor to set the username but what about getter?