diff options
author | Bulgakov Alexander <buls@yandex.ru> | 2019-05-04 23:41:14 +0300 |
---|---|---|
committer | Bulgakov Alexander <buls@yandex.ru> | 2019-05-04 23:41:14 +0300 |
commit | 8276dee2551d3f8d29f414a0a762565eec381258 (patch) | |
tree | 58e279150b6577b26e3a7a9c24aed4e1b347fda1 /test/transform/resource/before | |
parent | afe9e374975c85a87fdf6c0d45171ac44f616a37 (diff) | |
parent | 2611e6bf9830e4971dcae3abedfede59f3cc86a5 (diff) | |
download | lombok-8276dee2551d3f8d29f414a0a762565eec381258.tar.gz lombok-8276dee2551d3f8d29f414a0a762565eec381258.tar.bz2 lombok-8276dee2551d3f8d29f414a0a762565eec381258.zip |
Merge branch 'feature/typeInferenceImprovements' of https://github.com/bulgakovalexander/lombok into feature/typeInferenceImprovements
Diffstat (limited to 'test/transform/resource/before')
4 files changed, 51 insertions, 4 deletions
diff --git a/test/transform/resource/before/BuilderSimple.java b/test/transform/resource/before/BuilderSimple.java index 83c89713..d0a786db 100644 --- a/test/transform/resource/before/BuilderSimple.java +++ b/test/transform/resource/before/BuilderSimple.java @@ -1,6 +1,6 @@ import java.util.List; -@lombok.Builder +@lombok.Builder(access = lombok.AccessLevel.PROTECTED) class BuilderSimple<T> { private final int noshow = 0; private final int yes; diff --git a/test/transform/resource/before/FieldNameConstantsUppercased.java b/test/transform/resource/before/FieldNameConstantsUppercased.java new file mode 100644 index 00000000..674cb7f1 --- /dev/null +++ b/test/transform/resource/before/FieldNameConstantsUppercased.java @@ -0,0 +1,12 @@ +//CONF: lombok.fieldNameConstants.uppercase = true +import lombok.experimental.FieldNameConstants; +import lombok.AccessLevel; + +@FieldNameConstants(level = AccessLevel.PACKAGE) +public class FieldNameConstantsUppercased { + String iAmADvdPlayer; + int $skipMe; + static double skipMeToo; + @FieldNameConstants.Exclude int andMe; + String butPrintMePlease; +} diff --git a/test/transform/resource/before/SuperBuilderWithGenericsAndToBuilder.java b/test/transform/resource/before/SuperBuilderWithGenericsAndToBuilder.java index dae68034..1f2caf6d 100644 --- a/test/transform/resource/before/SuperBuilderWithGenericsAndToBuilder.java +++ b/test/transform/resource/before/SuperBuilderWithGenericsAndToBuilder.java @@ -1,10 +1,10 @@ -import java.util.List; +import java.util.Map; public class SuperBuilderWithGenericsAndToBuilder { @lombok.experimental.SuperBuilder(toBuilder = true) public static class Parent<A> { A field1; - @lombok.Singular List<String> items; + @lombok.Singular Map<Integer, String> items; } @lombok.experimental.SuperBuilder(toBuilder = true) @@ -13,6 +13,6 @@ public class SuperBuilderWithGenericsAndToBuilder { } public static void test() { - Child<Integer> x = Child.<Integer>builder().field3(0.0).field1(5).item("").build().toBuilder().build(); + Child<Integer> x = Child.<Integer>builder().field3(0.0).field1(5).item(5, "").build().toBuilder().build(); } } diff --git a/test/transform/resource/before/ValDelegateMethodReference.java b/test/transform/resource/before/ValDelegateMethodReference.java new file mode 100644 index 00000000..7adc402a --- /dev/null +++ b/test/transform/resource/before/ValDelegateMethodReference.java @@ -0,0 +1,35 @@ + +import lombok.Getter; +import lombok.Setter; +import lombok.experimental.Delegate; +import lombok.val; + +import java.util.function.Function; + +public class ValDelegateMethodReference { + + public void config() { + val column = createColumn(Entity::getValue); + } + + private <V> Column<Entity, V> createColumn(Function<Entity, V> func) { + return new Column<>(func); + } + +} + +class Column<T, V> { + public Column(Function<T, V> vp) {} +} + +class Entity { + @Delegate + private MyDelegate innerDelegate; +} + +@Getter +@Setter +class MyDelegate { + private String value; + private Boolean aBoolean; +}
\ No newline at end of file |