blob: 34668bbc55f1a0d20c92f96a96490ab2be38afa2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import java.util.List;
public class SuperBuilderWithNonNull {
@lombok.experimental.SuperBuilder
public static class Parent {
@lombok.NonNull
@lombok.Builder.Default
final String nonNullParentField = "default";
}
@lombok.experimental.SuperBuilder
public static class Child extends Parent {
@lombok.NonNull
String nonNullChildField;
}
public static void test() {
Child x = Child.builder().nonNullChildField("child").nonNullParentField("parent").build();
}
}
|