diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-09-17 23:44:26 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-09-18 01:21:33 +0200 |
commit | 9198551defb7dd71d872c7b86af0a3f0bf0ec545 (patch) | |
tree | 7669f792959f1b5632c8870ef2550f95313ea52c /test/transform/resource/before | |
parent | d7873f2d21564e8e7f22409fe03681d7dd4c8c1e (diff) | |
download | lombok-9198551defb7dd71d872c7b86af0a3f0bf0ec545.tar.gz lombok-9198551defb7dd71d872c7b86af0a3f0bf0ec545.tar.bz2 lombok-9198551defb7dd71d872c7b86af0a3f0bf0ec545.zip |
Finishing work on making lombok do sensible things with TYPE_USE annotations and for example their use on the typearg in a collection type which is being `@Singular`-ized.
Diffstat (limited to 'test/transform/resource/before')
-rw-r--r-- | test/transform/resource/before/BuilderSingularAnnotatedTypes.java | 10 | ||||
-rw-r--r-- | test/transform/resource/before/SuperBuilderSingularAnnotatedTypes.java | 14 |
2 files changed, 20 insertions, 4 deletions
diff --git a/test/transform/resource/before/BuilderSingularAnnotatedTypes.java b/test/transform/resource/before/BuilderSingularAnnotatedTypes.java index 163507b9..d54fed8d 100644 --- a/test/transform/resource/before/BuilderSingularAnnotatedTypes.java +++ b/test/transform/resource/before/BuilderSingularAnnotatedTypes.java @@ -1,12 +1,14 @@ //VERSION 8: +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; import java.util.Set; import java.util.Map; - import lombok.NonNull; import lombok.Singular; - +@Target(ElementType.TYPE_USE) +@interface MyAnnotation {} @lombok.Builder class BuilderSingularAnnotatedTypes { - @Singular private Set<@NonNull String> foos; - @Singular private Map<@NonNull String, @NonNull Integer> bars; + @Singular private Set<@MyAnnotation @NonNull String> foos; + @Singular private Map<@MyAnnotation @NonNull String, @MyAnnotation @NonNull Integer> bars; } diff --git a/test/transform/resource/before/SuperBuilderSingularAnnotatedTypes.java b/test/transform/resource/before/SuperBuilderSingularAnnotatedTypes.java new file mode 100644 index 00000000..d26352d2 --- /dev/null +++ b/test/transform/resource/before/SuperBuilderSingularAnnotatedTypes.java @@ -0,0 +1,14 @@ +//VERSION 8: +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; +import java.util.Set; +import java.util.Map; +import lombok.NonNull; +import lombok.Singular; +@Target(ElementType.TYPE_USE) +@interface MyAnnotation {} +@lombok.experimental.SuperBuilder +class SuperBuilderSingularAnnotatedTypes { + @Singular private Set<@MyAnnotation @NonNull String> foos; + @Singular private Map<@MyAnnotation @NonNull String, @MyAnnotation @NonNull Integer> bars; +} |