mirror of
https://github.com/tiennm99/lombok.git
synced 2026-09-05 00:18:37 +00:00
Example for the @Data annotation.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Setter;
|
||||
import lombok.Data;
|
||||
|
||||
@lombok.core.PrintAST(printContent=true)
|
||||
public @Data class DataExample {
|
||||
private final String name;
|
||||
private @Setter(AccessLevel.PACKAGE) int age;
|
||||
private double score;
|
||||
private String[] tags;
|
||||
|
||||
public static @Data(staticConstructor="of") class Exercise<T> {
|
||||
private final String name;
|
||||
private final T value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user