diff options
Diffstat (limited to 'test/transform/resource/before')
23 files changed, 205 insertions, 204 deletions
diff --git a/test/transform/resource/before/BuilderInvalidUse.java b/test/transform/resource/before/BuilderInvalidUse.java index 1a5f2950..3945e64c 100644 --- a/test/transform/resource/before/BuilderInvalidUse.java +++ b/test/transform/resource/before/BuilderInvalidUse.java @@ -3,7 +3,7 @@ class BuilderInvalidUse { private int something; - @lombok.Getter @lombok.Setter @lombok.experimental.FieldDefaults(makeFinal = true) @lombok.experimental.Wither @lombok.Data @lombok.ToString @lombok.EqualsAndHashCode + @lombok.Getter @lombok.Setter @lombok.experimental.FieldDefaults(makeFinal = true) @lombok.With @lombok.Data @lombok.ToString @lombok.EqualsAndHashCode @lombok.AllArgsConstructor public static class BuilderInvalidUseBuilder { diff --git a/test/transform/resource/before/CheckerFrameworkBasic.java b/test/transform/resource/before/CheckerFrameworkBasic.java index 5b59165a..7dd40b54 100644 --- a/test/transform/resource/before/CheckerFrameworkBasic.java +++ b/test/transform/resource/before/CheckerFrameworkBasic.java @@ -1,11 +1,11 @@ //CONF: checkerframework = 3.0 import lombok.Data; import lombok.experimental.Accessors; -import lombok.experimental.Wither; +import lombok.With; @Data @Accessors(chain = true) class CheckerFrameworkBasic { - @Wither private final int x; + @With private final int x; private final int y; private int z; } diff --git a/test/transform/resource/before/FlagUsages.java b/test/transform/resource/before/FlagUsages.java index 6631224f..df3e8044 100644 --- a/test/transform/resource/before/FlagUsages.java +++ b/test/transform/resource/before/FlagUsages.java @@ -1,10 +1,11 @@ //skip compare content //CONF: lombok.Getter.flagUsage = WARNING //CONF: lombok.experimental.flagUsage = ERROR +@lombok.experimental.FieldNameConstants public class FlagUsages { @lombok.Getter String x; - @lombok.experimental.Wither String z; + String z; public FlagUsages(String x, String y) { } diff --git a/test/transform/resource/before/SetterAndWitherJavadoc.java b/test/transform/resource/before/SetterAndWithMethodJavadoc.java index 6953eb39..ba10b7f2 100644 --- a/test/transform/resource/before/SetterAndWitherJavadoc.java +++ b/test/transform/resource/before/SetterAndWithMethodJavadoc.java @@ -1,10 +1,10 @@ -import lombok.experimental.Wither; -class SetterAndWitherJavadoc { +import lombok.With; +class SetterAndWithMethodJavadoc { /** * Some value. * @param the new value */ - @lombok.Setter @lombok.experimental.Wither int i; + @lombok.Setter @lombok.With int i; /** * Some other value. @@ -13,13 +13,13 @@ class SetterAndWitherJavadoc { * Set some other value. * @param the new other value * - * --- WITHER --- + * --- WITH --- * Reinstantiate with some other value. * @param the other new other value */ - @lombok.Setter @lombok.experimental.Wither int j; + @lombok.Setter @lombok.With int j; - SetterAndWitherJavadoc(int i, int j) { + SetterAndWithMethodJavadoc(int i, int j) { this.i = i; this.j = j; } diff --git a/test/transform/resource/before/WithAlreadyExists.java b/test/transform/resource/before/WithAlreadyExists.java new file mode 100644 index 00000000..ac1414b6 --- /dev/null +++ b/test/transform/resource/before/WithAlreadyExists.java @@ -0,0 +1,89 @@ +class With1 { + @lombok.With boolean foo; + + void withFoo(boolean foo) { + } + + With1(boolean foo) { + } +} + +class With2 { + @lombok.With boolean foo; + + void withFoo(String foo) { + } + + With2(boolean foo) { + } +} + +class With3 { + @lombok.With String foo; + + void withFoo(boolean foo) { + } + + With3(String foo) { + } +} + +class With4 { + @lombok.With String foo; + + void withFoo(String foo) { + } + + With4(String foo) { + } +} + +class With5 { + @lombok.With String foo; + + void withFoo() { + } + + With5(String foo) { + } +} + +class With6 { + @lombok.With String foo; + + void withFoo(String foo, int x) { + } + + With6(String foo) { + } +} + +class With7 { + @lombok.With String foo; + + void withFoo(String foo, Object... x) { + } + + With7(String foo) { + } +} + +class With8 { + @lombok.With boolean isFoo; + + void withIsFoo(boolean foo) { + } + + With8(boolean foo) { + } +} + +class With9 { + @lombok.With boolean isFoo; + + void withFoo(boolean foo) { + } + + With9(boolean foo) { + } +} diff --git a/test/transform/resource/before/WithAndAllArgsConstructor.java b/test/transform/resource/before/WithAndAllArgsConstructor.java new file mode 100644 index 00000000..d11d4faa --- /dev/null +++ b/test/transform/resource/before/WithAndAllArgsConstructor.java @@ -0,0 +1,12 @@ +@lombok.AllArgsConstructor +class WithAndAllArgsConstructor<T, J extends T, L extends java.lang.Number> { + @lombok.With J test; + + @lombok.With java.util.List<L> test2; + + final int x = 10; + + int y = 20; + + final int z; +}
\ No newline at end of file diff --git a/test/transform/resource/before/WithMethodAbstract.java b/test/transform/resource/before/WithMethodAbstract.java new file mode 100644 index 00000000..fd6edbc9 --- /dev/null +++ b/test/transform/resource/before/WithMethodAbstract.java @@ -0,0 +1,3 @@ +abstract class WithMethodAbstract { + @lombok.With String foo; +}
\ No newline at end of file diff --git a/test/transform/resource/before/WithMethodMarkedDeprecated.java b/test/transform/resource/before/WithMethodMarkedDeprecated.java new file mode 100644 index 00000000..7a6549e5 --- /dev/null +++ b/test/transform/resource/before/WithMethodMarkedDeprecated.java @@ -0,0 +1,15 @@ +import lombok.With; + +class WithMethodMarkedDeprecated { + + @Deprecated + @With int annotation; + + /** + * @deprecated + */ + @With int javadoc; + + WithMethodMarkedDeprecated(int annotation, int javadoc) { + } +}
\ No newline at end of file diff --git a/test/transform/resource/before/WithOnClass.java b/test/transform/resource/before/WithOnClass.java new file mode 100644 index 00000000..a6215b54 --- /dev/null +++ b/test/transform/resource/before/WithOnClass.java @@ -0,0 +1,45 @@ +@lombok.With +class WithOnClass1 { + @lombok.With(lombok.AccessLevel.NONE) + boolean isNone; + + boolean isPublic; + + WithOnClass1(boolean isNone, boolean isPublic) { + } +} + +@lombok.With(lombok.AccessLevel.PROTECTED) +class WithOnClass2 { + @lombok.With(lombok.AccessLevel.NONE) + boolean isNone; + + boolean isProtected; + + @lombok.With(lombok.AccessLevel.PACKAGE) + boolean isPackage; + + WithOnClass2(boolean isNone, boolean isProtected, boolean isPackage) { + } +} + +@lombok.With +class WithOnClass3 { + String couldBeNull; + + @lombok.NonNull String nonNull; + + WithOnClass3(String couldBeNull, String nonNull) { + } +} + +@lombok.With @lombok.experimental.Accessors(prefix="f") +class WithOnClass4 { + final int fX = 10; + + final int fY; + + WithOnClass4(int y) { + this.fY = y; + } +} diff --git a/test/transform/resource/before/WithOnStatic.java b/test/transform/resource/before/WithOnStatic.java new file mode 100644 index 00000000..f8105e0e --- /dev/null +++ b/test/transform/resource/before/WithOnStatic.java @@ -0,0 +1,4 @@ +class WithOnStatic { + @lombok.With static boolean foo; + @lombok.With static int bar; +} diff --git a/test/transform/resource/before/WithPlain.java b/test/transform/resource/before/WithPlain.java new file mode 100644 index 00000000..1b2a19c4 --- /dev/null +++ b/test/transform/resource/before/WithPlain.java @@ -0,0 +1,10 @@ +import lombok.With; +class WithPlain { + @lombok.With int i; + @With final int foo; + + WithPlain(int i, int foo) { + this.i = i; + this.foo = foo; + } +} diff --git a/test/transform/resource/before/WithWithDollar.java b/test/transform/resource/before/WithWithDollar.java new file mode 100644 index 00000000..1dd5d47d --- /dev/null +++ b/test/transform/resource/before/WithWithDollar.java @@ -0,0 +1,3 @@ +class WithWithDollar { + @lombok.With int $i; +} diff --git a/test/transform/resource/before/WithWithGenerics.java b/test/transform/resource/before/WithWithGenerics.java new file mode 100644 index 00000000..d94405d8 --- /dev/null +++ b/test/transform/resource/before/WithWithGenerics.java @@ -0,0 +1,9 @@ +class WithWithGenerics<T, J extends T, L extends java.lang.Number> { + @lombok.With J test; + @lombok.With java.util.List<L> test2; + @lombok.With java.util.List<? extends L> test3; + int $i; + + public WithWithGenerics(J test, java.util.List<L> test2, java.util.List<? extends L> test3) { + } +}
\ No newline at end of file diff --git a/test/transform/resource/before/WitherTypeAnnos.java b/test/transform/resource/before/WithWithTypeAnnos.java index 97cd3d9f..ceef6d61 100644 --- a/test/transform/resource/before/WitherTypeAnnos.java +++ b/test/transform/resource/before/WithWithTypeAnnos.java @@ -1,5 +1,5 @@ //CONF: lombok.copyableAnnotations += TA -import lombok.experimental.Wither; +import lombok.With; import java.lang.annotation.ElementType; import java.lang.annotation.Target; import java.util.List; @@ -9,10 +9,10 @@ import java.util.List; @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER}) @interface TB { } -class WitherTypeAnnos { - @Wither final @TA @TB List<String> foo; +class WithWithTypeAnnos { + @With final @TA @TB List<String> foo; - WitherTypeAnnos(@TA @TB List<String> foo) { + WithWithTypeAnnos(@TA @TB List<String> foo) { this.foo = foo; } } diff --git a/test/transform/resource/before/WitherAlreadyExists.java b/test/transform/resource/before/WitherAlreadyExists.java deleted file mode 100644 index 7833173a..00000000 --- a/test/transform/resource/before/WitherAlreadyExists.java +++ /dev/null @@ -1,89 +0,0 @@ -class Wither1 { - @lombok.experimental.Wither boolean foo; - - void withFoo(boolean foo) { - } - - Wither1(boolean foo) { - } -} - -class Wither2 { - @lombok.experimental.Wither boolean foo; - - void withFoo(String foo) { - } - - Wither2(boolean foo) { - } -} - -class Wither3 { - @lombok.experimental.Wither String foo; - - void withFoo(boolean foo) { - } - - Wither3(String foo) { - } -} - -class Wither4 { - @lombok.experimental.Wither String foo; - - void withFoo(String foo) { - } - - Wither4(String foo) { - } -} - -class Wither5 { - @lombok.experimental.Wither String foo; - - void withFoo() { - } - - Wither5(String foo) { - } -} - -class Wither6 { - @lombok.experimental.Wither String foo; - - void withFoo(String foo, int x) { - } - - Wither6(String foo) { - } -} - -class Wither7 { - @lombok.experimental.Wither String foo; - - void withFoo(String foo, Object... x) { - } - - Wither7(String foo) { - } -} - -class Wither8 { - @lombok.experimental.Wither boolean isFoo; - - void withIsFoo(boolean foo) { - } - - Wither8(boolean foo) { - } -} - -class Wither9 { - @lombok.experimental.Wither boolean isFoo; - - void withFoo(boolean foo) { - } - - Wither9(boolean foo) { - } -} diff --git a/test/transform/resource/before/WitherAndAllArgsConstructor.java b/test/transform/resource/before/WitherAndAllArgsConstructor.java deleted file mode 100644 index d531b3f4..00000000 --- a/test/transform/resource/before/WitherAndAllArgsConstructor.java +++ /dev/null @@ -1,12 +0,0 @@ -@lombok.AllArgsConstructor -class WitherAndAllArgsConstructor<T, J extends T, L extends java.lang.Number> { - @lombok.experimental.Wither J test; - - @lombok.experimental.Wither java.util.List<L> test2; - - final int x = 10; - - int y = 20; - - final int z; -}
\ No newline at end of file diff --git a/test/transform/resource/before/WitherDeprecated.java b/test/transform/resource/before/WitherDeprecated.java deleted file mode 100644 index efd1af43..00000000 --- a/test/transform/resource/before/WitherDeprecated.java +++ /dev/null @@ -1,15 +0,0 @@ -import lombok.experimental.Wither; - -class WitherDeprecated { - - @Deprecated - @Wither int annotation; - - /** - * @deprecated - */ - @Wither int javadoc; - - WitherDeprecated(int annotation, int javadoc) { - } -}
\ No newline at end of file diff --git a/test/transform/resource/before/WitherOnClass.java b/test/transform/resource/before/WitherOnClass.java deleted file mode 100644 index d6a3d3c8..00000000 --- a/test/transform/resource/before/WitherOnClass.java +++ /dev/null @@ -1,45 +0,0 @@ -@lombok.experimental.Wither -class WitherOnClass1 { - @lombok.experimental.Wither(lombok.AccessLevel.NONE) - boolean isNone; - - boolean isPublic; - - WitherOnClass1(boolean isNone, boolean isPublic) { - } -} - -@lombok.experimental.Wither(lombok.AccessLevel.PROTECTED) -class WitherOnClass2 { - @lombok.experimental.Wither(lombok.AccessLevel.NONE) - boolean isNone; - - boolean isProtected; - - @lombok.experimental.Wither(lombok.AccessLevel.PACKAGE) - boolean isPackage; - - WitherOnClass2(boolean isNone, boolean isProtected, boolean isPackage) { - } -} - -@lombok.experimental.Wither -class WitherOnClass3 { - String couldBeNull; - - @lombok.NonNull String nonNull; - - WitherOnClass3(String couldBeNull, String nonNull) { - } -} - -@lombok.experimental.Wither @lombok.experimental.Accessors(prefix="f") -class WitherOnClass4 { - final int fX = 10; - - final int fY; - - WitherOnClass4(int y) { - this.fY = y; - } -} diff --git a/test/transform/resource/before/WitherOnStatic.java b/test/transform/resource/before/WitherOnStatic.java deleted file mode 100644 index 566c8154..00000000 --- a/test/transform/resource/before/WitherOnStatic.java +++ /dev/null @@ -1,4 +0,0 @@ -class WitherOnStatic { - @lombok.experimental.Wither static boolean foo; - @lombok.experimental.Wither static int bar; -} diff --git a/test/transform/resource/before/WitherPlain.java b/test/transform/resource/before/WitherPlain.java deleted file mode 100644 index 436e6f3b..00000000 --- a/test/transform/resource/before/WitherPlain.java +++ /dev/null @@ -1,10 +0,0 @@ -import lombok.experimental.Wither; -class WitherPlain { - @lombok.experimental.Wither int i; - @Wither final int foo; - - WitherPlain(int i, int foo) { - this.i = i; - this.foo = foo; - } -} diff --git a/test/transform/resource/before/WitherWithAbstract.java b/test/transform/resource/before/WitherWithAbstract.java deleted file mode 100644 index acc9094b..00000000 --- a/test/transform/resource/before/WitherWithAbstract.java +++ /dev/null @@ -1,3 +0,0 @@ -abstract class WitherWithAbstract { - @lombok.experimental.Wither String foo; -}
\ No newline at end of file diff --git a/test/transform/resource/before/WitherWithDollar.java b/test/transform/resource/before/WitherWithDollar.java deleted file mode 100644 index 8dd2572f..00000000 --- a/test/transform/resource/before/WitherWithDollar.java +++ /dev/null @@ -1,3 +0,0 @@ -class WitherWithDollar { - @lombok.experimental.Wither int $i; -} diff --git a/test/transform/resource/before/WitherWithGenerics.java b/test/transform/resource/before/WitherWithGenerics.java deleted file mode 100644 index 0b0fdd46..00000000 --- a/test/transform/resource/before/WitherWithGenerics.java +++ /dev/null @@ -1,9 +0,0 @@ -class WitherWithGenerics<T, J extends T, L extends java.lang.Number> { - @lombok.experimental.Wither J test; - @lombok.experimental.Wither java.util.List<L> test2; - @lombok.experimental.Wither java.util.List<? extends L> test3; - int $i; - - public WitherWithGenerics(J test, java.util.List<L> test2, java.util.List<? extends L> test3) { - } -}
\ No newline at end of file |