lombok staticConstructor = “of”
@Data(staticConstructor = “of”)
public abstract String staticConstructor()
If you specify a static constructor name, then the generated constructor will be private, and instead a static factory method is created that other classes can use to create instances. We suggest the name: “of”, like so:
public @Data(staticConstructor = “of”) class Point { final int x, y; }
Default: No static constructor, instead the normal constructor is public.
Returns:
Name of static ‘constructor’ method to generate (blank = generate a normal constructor).