mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 10:15:53 +00:00
added SuperBuilder with generics test case
This commit is contained in:
1 parent
f13f5c6973
commit
9df6555912
2 files changed
+186
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.Singular;
|
||||
import java.util.List;
|
||||
|
||||
public class SuperBuilderWithGenerics {
|
||||
@SuperBuilder
|
||||
public static class Parent<A> {
|
||||
A field1;
|
||||
@Singular List<String> items;
|
||||
}
|
||||
|
||||
@SuperBuilder
|
||||
public static class Child<A> extends Parent<A> {
|
||||
double field3;
|
||||
}
|
||||
|
||||
public static void test() {
|
||||
Child<Integer> x = Child.<Integer>builder().field3(0.0).field1(5).item("").build();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user