diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2015-07-17 00:09:27 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2015-07-17 00:09:27 +0200 |
commit | a17d1fc13db231bd84996d7f8fd68d5514f5aab8 (patch) | |
tree | a7e560c8c2df80c30198d624767b4de0bc17ea2c /test | |
parent | 389034c937d9358baf08e0877a2d0c119b67da59 (diff) | |
download | lombok-a17d1fc13db231bd84996d7f8fd68d5514f5aab8.tar.gz lombok-a17d1fc13db231bd84996d7f8fd68d5514f5aab8.tar.bz2 lombok-a17d1fc13db231bd84996d7f8fd68d5514f5aab8.zip |
eclipse impl for @Builder(toBuilder=true)
Diffstat (limited to 'test')
-rw-r--r-- | test/transform/resource/before/BuilderWithToBuilder.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/transform/resource/before/BuilderWithToBuilder.java b/test/transform/resource/before/BuilderWithToBuilder.java new file mode 100644 index 00000000..98b7cebc --- /dev/null +++ b/test/transform/resource/before/BuilderWithToBuilder.java @@ -0,0 +1,36 @@ +import java.util.List; +import lombok.Builder; + +@Builder(toBuilder = true) @lombok.experimental.Accessors(prefix = "m") +class BuilderWithToBuilder<T> { + private String mOne, mTwo; + @Builder.ObtainVia(method = "rrr", isStatic = true) private T foo; + @lombok.Singular private List<T> bars; + + public static <K> K rrr(BuilderWithToBuilder<K> x) { + return x.foo; + } +} + +@lombok.experimental.Accessors(prefix = "m") +class ConstructorWithToBuilder<T> { + private String mOne, mTwo; + private T foo; + @lombok.Singular private List<T> bars; + + @Builder(toBuilder = true) + public ConstructorWithToBuilder(String mOne, @Builder.ObtainVia(field = "foo") T bar) { + } +} + +@lombok.experimental.Accessors(prefix = "m") +class StaticWithToBuilder<T> { + private String mOne, mTwo; + private T foo; + @lombok.Singular private List<T> bars; + + @Builder(toBuilder = true) + public static <Z> StaticWithToBuilder<Z> test(String mOne, @Builder.ObtainVia(field = "foo") Z bar) { + return new StaticWithToBuilder<Z>(); + } +} |