I have a class for all static members. The number of static members is more than 10 (which may increase with time).
I am using lombok and I want to generate Getters/Setters for all static members using single @Getter and @Setter annotation on class like we do for non-static members.
I know that
You can also put a @Getter and/or @Setter annotation on a class. In that case, it's as if you annotate all the non-static fields in that class with the annotation.
I also know that
We can annotate static fields individually using
@Getter @Setterto generate Getters/Setters for static fields.
But this looks ugly and I want to make my class look as clean as possible.
Is there any way I can configure / Override @Getter and @Setter annotation so that I can annotate the class and it generate Getters and Setters for all members including static and non-static members, after all what those methods do is to return the mentioned variable.
To be more precise, i want following code snippet to generate Getters and Setters for all class variables-
@Getter
@Setter
public class myClass {
private static String d;
private static SomePojo c;
private String a;
private Integer b;
private SomeClass d;
}