@Target(value=TYPE)
@Retention(value=SOURCE)
public @interface Data
Equivalent to @Getter @Setter @RequiredArgsConstructor @ToString @EqualsAndHashCode.
Complete documentation is found at the project lombok features page for @Data.
Getter,
Setter,
RequiredArgsConstructor,
ToString,
EqualsAndHashCode,
Value| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.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.
|
public abstract java.lang.String staticConstructor
public @Data(staticConstructor = "of") class Point { final int x, y; }
Default: No static constructor, instead the normal constructor is public.Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.