mirror of
https://github.com/tiennm99/lombok.git
synced 2026-09-20 04:23:33 +00:00
Added documentation for @RequiredArgsConstructor, @NoArgsConstructor, @AllArgsConstructor, and also how these generate @ConstructorProperties annotations.
Also updated @Getter and @Setter's documentation to explain their new class-level feature, and updated @Data's description to highlight how @Data is now truly nothing more than the combination of @RequiredArgsConstructor, @EqualsAndHashCode, @ToString, @Getter, and @Setter.
This commit is contained in:
1 parent
f17ba28daa
commit
aaf8547d91
8 files changed
+164
-20
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import lombok.AccessLevel;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NonNull;
|
||||
|
||||
@RequiredArgsConstructor(staticName = "of")
|
||||
@AllArgsConstructor(access = AccessLevel.PROTECTED)
|
||||
public class ConstructorExample<T> {
|
||||
private int x, y;
|
||||
@NonNull private T description;
|
||||
|
||||
@NoArgsConstructor
|
||||
public static class NoArgsExample {
|
||||
@NonNull private String field;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user