diff options
Diffstat (limited to 'test/transform/resource/after-ecj')
9 files changed, 238 insertions, 9 deletions
diff --git a/test/transform/resource/after-ecj/WitherAccessLevel.java b/test/transform/resource/after-ecj/WitherAccessLevel.java index 0facc12f..09a2e514 100644 --- a/test/transform/resource/after-ecj/WitherAccessLevel.java +++ b/test/transform/resource/after-ecj/WitherAccessLevel.java @@ -1 +1,27 @@ -//ignore +import lombok.AccessLevel; +class WitherAccessLevel { + @lombok.experimental.Wither(lombok.AccessLevel.NONE) boolean isNone; + @lombok.experimental.Wither(AccessLevel.PRIVATE) boolean isPrivate; + @lombok.experimental.Wither(lombok.AccessLevel.PACKAGE) boolean isPackage; + @lombok.experimental.Wither(AccessLevel.PROTECTED) boolean isProtected; + @lombok.experimental.Wither(lombok.AccessLevel.PUBLIC) boolean isPublic; + @lombok.experimental.Wither(value = lombok.AccessLevel.PUBLIC) boolean value; + WitherAccessLevel(boolean isNone, boolean isPrivate, boolean isPackage, boolean isProtected, boolean isPublic, boolean value) { + super(); + } + private @java.lang.SuppressWarnings("all") WitherAccessLevel withPrivate(final boolean isPrivate) { + return ((this.isPrivate == isPrivate) ? this : new WitherAccessLevel(this.isNone, isPrivate, this.isPackage, this.isProtected, this.isPublic, this.value)); + } + @java.lang.SuppressWarnings("all") WitherAccessLevel withPackage(final boolean isPackage) { + return ((this.isPackage == isPackage) ? this : new WitherAccessLevel(this.isNone, this.isPrivate, isPackage, this.isProtected, this.isPublic, this.value)); + } + protected @java.lang.SuppressWarnings("all") WitherAccessLevel withProtected(final boolean isProtected) { + return ((this.isProtected == isProtected) ? this : new WitherAccessLevel(this.isNone, this.isPrivate, this.isPackage, isProtected, this.isPublic, this.value)); + } + public @java.lang.SuppressWarnings("all") WitherAccessLevel withPublic(final boolean isPublic) { + return ((this.isPublic == isPublic) ? this : new WitherAccessLevel(this.isNone, this.isPrivate, this.isPackage, this.isProtected, isPublic, this.value)); + } + public @java.lang.SuppressWarnings("all") WitherAccessLevel withValue(final boolean value) { + return ((this.value == value) ? this : new WitherAccessLevel(this.isNone, this.isPrivate, this.isPackage, this.isProtected, this.isPublic, value)); + } +} diff --git a/test/transform/resource/after-ecj/WitherAlreadyExists.java b/test/transform/resource/after-ecj/WitherAlreadyExists.java index 0facc12f..ded10755 100644 --- a/test/transform/resource/after-ecj/WitherAlreadyExists.java +++ b/test/transform/resource/after-ecj/WitherAlreadyExists.java @@ -1 +1,78 @@ -//ignore +class Wither1 { + @lombok.experimental.Wither boolean foo; + void withFoo(boolean foo) { + } + Wither1(boolean foo) { + super(); + } +} +class Wither2 { + @lombok.experimental.Wither boolean foo; + void withFoo(String foo) { + } + Wither2(boolean foo) { + super(); + } +} +class Wither3 { + @lombok.experimental.Wither String foo; + void withFoo(boolean foo) { + } + Wither3(String foo) { + super(); + } +} +class Wither4 { + @lombok.experimental.Wither String foo; + void withFoo(String foo) { + } + Wither4(String foo) { + super(); + } +} +class Wither5 { + @lombok.experimental.Wither String foo; + void withFoo() { + } + Wither5(String foo) { + super(); + } + public @java.lang.SuppressWarnings("all") Wither5 withFoo(final String foo) { + return ((this.foo == foo) ? this : new Wither5(foo)); + } +} +class Wither6 { + @lombok.experimental.Wither String foo; + void withFoo(String foo, int x) { + } + Wither6(String foo) { + super(); + } + public @java.lang.SuppressWarnings("all") Wither6 withFoo(final String foo) { + return ((this.foo == foo) ? this : new Wither6(foo)); + } +} +class Wither7 { + @lombok.experimental.Wither String foo; + void withFoo(String foo, Object... x) { + } + Wither7(String foo) { + super(); + } +} +class Wither8 { + @lombok.experimental.Wither boolean isFoo; + void withIsFoo(boolean foo) { + } + Wither8(boolean foo) { + super(); + } +} +class Wither9 { + @lombok.experimental.Wither boolean isFoo; + void withFoo(boolean foo) { + } + Wither9(boolean foo) { + super(); + } +} diff --git a/test/transform/resource/after-ecj/WitherAndAllArgsConstructor.java b/test/transform/resource/after-ecj/WitherAndAllArgsConstructor.java index 0facc12f..091024e2 100644 --- a/test/transform/resource/after-ecj/WitherAndAllArgsConstructor.java +++ b/test/transform/resource/after-ecj/WitherAndAllArgsConstructor.java @@ -1 +1,20 @@ -//ignore +@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; + public @java.lang.SuppressWarnings("all") WitherAndAllArgsConstructor<T, J, L> withTest(final J test) { + return ((this.test == test) ? this : new WitherAndAllArgsConstructor<T, J, L>(test, this.test2, this.y, this.z)); + } + public @java.lang.SuppressWarnings("all") WitherAndAllArgsConstructor<T, J, L> withTest2(final java.util.List<L> test2) { + return ((this.test2 == test2) ? this : new WitherAndAllArgsConstructor<T, J, L>(this.test, test2, this.y, this.z)); + } + public @java.beans.ConstructorProperties({"test", "test2", "y", "z"}) @java.lang.SuppressWarnings("all") WitherAndAllArgsConstructor(final J test, final java.util.List<L> test2, final int y, final int z) { + super(); + this.test = test; + this.test2 = test2; + this.y = y; + this.z = z; + } +} diff --git a/test/transform/resource/after-ecj/WitherDeprecated.java b/test/transform/resource/after-ecj/WitherDeprecated.java index 0facc12f..b57d0d79 100644 --- a/test/transform/resource/after-ecj/WitherDeprecated.java +++ b/test/transform/resource/after-ecj/WitherDeprecated.java @@ -1 +1,14 @@ -//ignore +import lombok.experimental.Wither; +class WitherDeprecated { + @Deprecated @Wither int annotation; + @Wither int javadoc; + WitherDeprecated(int annotation, int javadoc) { + super(); + } + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") WitherDeprecated withAnnotation(final int annotation) { + return ((this.annotation == annotation) ? this : new WitherDeprecated(annotation, this.javadoc)); + } + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") WitherDeprecated withJavadoc(final int javadoc) { + return ((this.javadoc == javadoc) ? this : new WitherDeprecated(this.annotation, javadoc)); + } +} diff --git a/test/transform/resource/after-ecj/WitherOnClass.java b/test/transform/resource/after-ecj/WitherOnClass.java index 0facc12f..ff4566e5 100644 --- a/test/transform/resource/after-ecj/WitherOnClass.java +++ b/test/transform/resource/after-ecj/WitherOnClass.java @@ -1 +1,50 @@ -//ignore +@lombok.experimental.Wither class WitherOnClass1 { + @lombok.experimental.Wither(lombok.AccessLevel.NONE) boolean isNone; + boolean isPublic; + WitherOnClass1(boolean isNone, boolean isPublic) { + super(); + } + public @java.lang.SuppressWarnings("all") WitherOnClass1 withPublic(final boolean isPublic) { + return ((this.isPublic == isPublic) ? this : new WitherOnClass1(this.isNone, 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) { + super(); + } + @java.lang.SuppressWarnings("all") WitherOnClass2 withPackage(final boolean isPackage) { + return ((this.isPackage == isPackage) ? this : new WitherOnClass2(this.isNone, this.isProtected, isPackage)); + } + protected @java.lang.SuppressWarnings("all") WitherOnClass2 withProtected(final boolean isProtected) { + return ((this.isProtected == isProtected) ? this : new WitherOnClass2(this.isNone, isProtected, this.isPackage)); + } +} +@lombok.experimental.Wither class WitherOnClass3 { + String couldBeNull; + @lombok.NonNull String nonNull; + WitherOnClass3(String couldBeNull, String nonNull) { + super(); + } + public @java.lang.SuppressWarnings("all") WitherOnClass3 withCouldBeNull(final String couldBeNull) { + return ((this.couldBeNull == couldBeNull) ? this : new WitherOnClass3(couldBeNull, this.nonNull)); + } + public @java.lang.SuppressWarnings("all") WitherOnClass3 withNonNull(final @lombok.NonNull String nonNull) { + if ((nonNull == null)) + throw new java.lang.NullPointerException("nonNull"); + return ((this.nonNull == nonNull) ? this : new WitherOnClass3(this.couldBeNull, nonNull)); + } +} +@lombok.experimental.Wither @lombok.experimental.Accessors(prefix = "f") class WitherOnClass4 { + final int fX = 10; + final int fY; + WitherOnClass4(int y) { + super(); + this.fY = y; + } + public @java.lang.SuppressWarnings("all") WitherOnClass4 withY(final int fY) { + return ((this.fY == fY) ? this : new WitherOnClass4(fY)); + } +} diff --git a/test/transform/resource/after-ecj/WitherOnStatic.java b/test/transform/resource/after-ecj/WitherOnStatic.java index 0facc12f..8f385e09 100644 --- a/test/transform/resource/after-ecj/WitherOnStatic.java +++ b/test/transform/resource/after-ecj/WitherOnStatic.java @@ -1 +1,9 @@ -//ignore +class WitherOnStatic { + static @lombok.experimental.Wither boolean foo; + static @lombok.experimental.Wither int bar; + <clinit>() { + } + WitherOnStatic() { + super(); + } +} diff --git a/test/transform/resource/after-ecj/WitherPlain.java b/test/transform/resource/after-ecj/WitherPlain.java index 0facc12f..ae1988bc 100644 --- a/test/transform/resource/after-ecj/WitherPlain.java +++ b/test/transform/resource/after-ecj/WitherPlain.java @@ -1 +1,16 @@ -//ignore +import lombok.experimental.Wither; +class WitherPlain { + @lombok.experimental.Wither int i; + final @Wither int foo; + WitherPlain(int i, int foo) { + super(); + this.i = i; + this.foo = foo; + } + public @java.lang.SuppressWarnings("all") WitherPlain withI(final int i) { + return ((this.i == i) ? this : new WitherPlain(i, this.foo)); + } + public @java.lang.SuppressWarnings("all") WitherPlain withFoo(final int foo) { + return ((this.foo == foo) ? this : new WitherPlain(this.i, foo)); + } +} diff --git a/test/transform/resource/after-ecj/WitherWithDollar.java b/test/transform/resource/after-ecj/WitherWithDollar.java index 0facc12f..db46e259 100644 --- a/test/transform/resource/after-ecj/WitherWithDollar.java +++ b/test/transform/resource/after-ecj/WitherWithDollar.java @@ -1 +1,6 @@ -//ignore +class WitherWithDollar { + @lombok.experimental.Wither int $i; + WitherWithDollar() { + super(); + } +} diff --git a/test/transform/resource/after-ecj/WitherWithGenerics.java b/test/transform/resource/after-ecj/WitherWithGenerics.java index 0facc12f..ee73297c 100644 --- a/test/transform/resource/after-ecj/WitherWithGenerics.java +++ b/test/transform/resource/after-ecj/WitherWithGenerics.java @@ -1 +1,18 @@ -//ignore +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) { + super(); + } + public @java.lang.SuppressWarnings("all") WitherWithGenerics<T, J, L> withTest(final J test) { + return ((this.test == test) ? this : new WitherWithGenerics<T, J, L>(test, this.test2, this.test3)); + } + public @java.lang.SuppressWarnings("all") WitherWithGenerics<T, J, L> withTest2(final java.util.List<L> test2) { + return ((this.test2 == test2) ? this : new WitherWithGenerics<T, J, L>(this.test, test2, this.test3)); + } + public @java.lang.SuppressWarnings("all") WitherWithGenerics<T, J, L> withTest3(final java.util.List<? extends L> test3) { + return ((this.test3 == test3) ? this : new WitherWithGenerics<T, J, L>(this.test, this.test2, test3)); + } +} |