diff options
Diffstat (limited to 'test/transform/resource/after-ecj')
22 files changed, 497 insertions, 37 deletions
diff --git a/test/transform/resource/after-ecj/ConstructorsWithAccessors.java b/test/transform/resource/after-ecj/ConstructorsWithAccessors.java index 301e6132..6050ab9f 100644 --- a/test/transform/resource/after-ecj/ConstructorsWithAccessors.java +++ b/test/transform/resource/after-ecj/ConstructorsWithAccessors.java @@ -20,19 +20,19 @@ super(); if ((plower == null)) { - throw new java.lang.NullPointerException("plower"); + throw new java.lang.NullPointerException("plower is marked @NonNull but is null"); } if ((upper == null)) { - throw new java.lang.NullPointerException("upper"); + throw new java.lang.NullPointerException("upper is marked @NonNull but is null"); } if ((huh == null)) { - throw new java.lang.NullPointerException("huh"); + throw new java.lang.NullPointerException("huh is marked @NonNull but is null"); } if ((_huh2 == null)) { - throw new java.lang.NullPointerException("_huh2"); + throw new java.lang.NullPointerException("_huh2 is marked @NonNull but is null"); } this.plower = plower; this.pUpper = upper; diff --git a/test/transform/resource/after-ecj/DataConfiguration.java b/test/transform/resource/after-ecj/DataConfiguration.java index 1e7adfbf..25f7620e 100644 --- a/test/transform/resource/after-ecj/DataConfiguration.java +++ b/test/transform/resource/after-ecj/DataConfiguration.java @@ -31,4 +31,8 @@ super(); this.x = x; } + private @java.lang.SuppressWarnings("all") DataConfiguration() { + super(); + this.x = 0; + } } diff --git a/test/transform/resource/after-ecj/DataOnLocalClass.java b/test/transform/resource/after-ecj/DataOnLocalClass.java index 341df49b..ff2a3d20 100644 --- a/test/transform/resource/after-ecj/DataOnLocalClass.java +++ b/test/transform/resource/after-ecj/DataOnLocalClass.java @@ -64,7 +64,7 @@ class DataOnLocalClass2 { public @java.lang.SuppressWarnings("all") void setName(final @lombok.NonNull String name) { if ((name == null)) { - throw new java.lang.NullPointerException("name"); + throw new java.lang.NullPointerException("name is marked @NonNull but is null"); } this.name = name; } @@ -99,7 +99,7 @@ class DataOnLocalClass2 { super(); if ((name == null)) { - throw new java.lang.NullPointerException("name"); + throw new java.lang.NullPointerException("name is marked @NonNull but is null"); } this.name = name; } diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeNewStyle.java b/test/transform/resource/after-ecj/EqualsAndHashCodeNewStyle.java new file mode 100644 index 00000000..7fbe6d24 --- /dev/null +++ b/test/transform/resource/after-ecj/EqualsAndHashCodeNewStyle.java @@ -0,0 +1,53 @@ +import lombok.EqualsAndHashCode; +public @EqualsAndHashCode class EqualsAndHashCodeNewStyle { + @EqualsAndHashCode.Include int b; + double c; + int f; + @EqualsAndHashCode.Include int d; + int g; + @EqualsAndHashCode.Exclude int j; + public EqualsAndHashCodeNewStyle() { + super(); + } + @EqualsAndHashCode.Include int f() { + return 0; + } + @EqualsAndHashCode.Include(replaces = "g") long i() { + return 0; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof EqualsAndHashCodeNewStyle))) + return false; + final EqualsAndHashCodeNewStyle other = (EqualsAndHashCodeNewStyle) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + if ((this.b != other.b)) + return false; + if ((java.lang.Double.compare(this.c, other.c) != 0)) + return false; + if ((this.d != other.d)) + return false; + if ((this.f() != other.f())) + return false; + if ((this.i() != other.i())) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { + return (other instanceof EqualsAndHashCodeNewStyle); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 59; + int result = 1; + result = ((result * PRIME) + this.b); + final long $c = java.lang.Double.doubleToLongBits(this.c); + result = ((result * PRIME) + (int) ($c ^ ($c >>> 32))); + result = ((result * PRIME) + this.d); + result = ((result * PRIME) + this.f()); + final long $$i = this.i(); + result = ((result * PRIME) + (int) ($$i ^ ($$i >>> 32))); + return result; + } +} diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeWithGenericsOnInnersInInterfaces.java b/test/transform/resource/after-ecj/EqualsAndHashCodeWithGenericsOnInnersInInterfaces.java new file mode 100644 index 00000000..8c849502 --- /dev/null +++ b/test/transform/resource/after-ecj/EqualsAndHashCodeWithGenericsOnInnersInInterfaces.java @@ -0,0 +1,30 @@ +public interface EqualsAndHashCodeWithGenericsOnInnersInInterfaces<A> { + @lombok.EqualsAndHashCode class Inner<B> { + int x; + Inner() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof EqualsAndHashCodeWithGenericsOnInnersInInterfaces.Inner))) + return false; + final EqualsAndHashCodeWithGenericsOnInnersInInterfaces.Inner<?> other = (EqualsAndHashCodeWithGenericsOnInnersInInterfaces.Inner<?>) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + if ((this.x != other.x)) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { + return (other instanceof EqualsAndHashCodeWithGenericsOnInnersInInterfaces.Inner); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 59; + int result = 1; + result = ((result * PRIME) + this.x); + return result; + } + } +} + diff --git a/test/transform/resource/after-ecj/FieldNameConstantsBasic.java b/test/transform/resource/after-ecj/FieldNameConstantsBasic.java new file mode 100644 index 00000000..f77203ba --- /dev/null +++ b/test/transform/resource/after-ecj/FieldNameConstantsBasic.java @@ -0,0 +1,15 @@ +import lombok.experimental.FieldNameConstants; +import lombok.AccessLevel; +public @FieldNameConstants class FieldNameConstantsBasic { + public static final java.lang.String FIELD_BUT_PRINT_ME_PLEASE = "butPrintMePlease"; + protected static final java.lang.String FIELD_I_AM_A_DVD_PLAYER = "iAmADvdPlayer"; + @FieldNameConstants(level = AccessLevel.PROTECTED) String iAmADvdPlayer; + int $skipMe; + static double skipMeToo; + String butPrintMePlease; + <clinit>() { + } + public FieldNameConstantsBasic() { + super(); + } +} diff --git a/test/transform/resource/after-ecj/FieldNameConstantsConfigKeys.java b/test/transform/resource/after-ecj/FieldNameConstantsConfigKeys.java new file mode 100644 index 00000000..44629ee5 --- /dev/null +++ b/test/transform/resource/after-ecj/FieldNameConstantsConfigKeys.java @@ -0,0 +1,9 @@ +public @lombok.experimental.FieldNameConstants class FieldNameConstantsConfigKeys { + public static final java.lang.String I_AM_A_DVD_PLAYER_SFX = "iAmADvdPlayer"; + String iAmADvdPlayer; + <clinit>() { + } + public FieldNameConstantsConfigKeys() { + super(); + } +} diff --git a/test/transform/resource/after-ecj/FieldNameConstantsWeird.java b/test/transform/resource/after-ecj/FieldNameConstantsWeird.java new file mode 100644 index 00000000..9958f664 --- /dev/null +++ b/test/transform/resource/after-ecj/FieldNameConstantsWeird.java @@ -0,0 +1,13 @@ +import lombok.experimental.FieldNameConstants; +import lombok.AccessLevel; +public @FieldNameConstants class FieldNameConstantsWeird { + public static final java.lang.String FIELD_AZ = "A"; + @FieldNameConstants(level = AccessLevel.NONE) String iAmADvdPlayer; + @FieldNameConstants(prefix = "") String X; + @FieldNameConstants(suffix = "Z") String A; + <clinit>() { + } + public FieldNameConstantsWeird() { + super(); + } +} diff --git a/test/transform/resource/after-ecj/GetterOnMethodErrors.java b/test/transform/resource/after-ecj/GetterOnMethodErrors.java deleted file mode 100644 index 16c625b5..00000000 --- a/test/transform/resource/after-ecj/GetterOnMethodErrors.java +++ /dev/null @@ -1,14 +0,0 @@ -class PlaceFillerToMakeSurePositionIsRelevant { - PlaceFillerToMakeSurePositionIsRelevant() { - super(); - } -} -@lombok.Getter() class GetterOnMethodErrors { - private int test; - GetterOnMethodErrors() { - super(); - } - public @java.lang.SuppressWarnings("all") int getTest() { - return this.test; - } -}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/GetterOnMethodOnType.java b/test/transform/resource/after-ecj/GetterOnMethodOnType.java new file mode 100644 index 00000000..2b39abf2 --- /dev/null +++ b/test/transform/resource/after-ecj/GetterOnMethodOnType.java @@ -0,0 +1,13 @@ +@lombok.Getter() class GetterOnMethodOnType { + private int test; + private String name; + GetterOnMethodOnType() { + super(); + } + public @Deprecated @java.lang.SuppressWarnings("all") int getTest() { + return this.test; + } + public @Deprecated @java.lang.SuppressWarnings("all") String getName() { + return this.name; + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/LoggerFlogger.java b/test/transform/resource/after-ecj/LoggerFlogger.java new file mode 100644 index 00000000..d0526eee --- /dev/null +++ b/test/transform/resource/after-ecj/LoggerFlogger.java @@ -0,0 +1,30 @@ +import lombok.extern.flogger.Flogger; +@lombok.extern.flogger.Flogger class LoggerFlogger { + private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); + <clinit>() { + } + LoggerFlogger() { + super(); + } +} +@Flogger class LoggerFloggerWithImport { + private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); + <clinit>() { + } + LoggerFloggerWithImport() { + super(); + } +} +class LoggerFloggerOuter { + static @lombok.extern.flogger.Flogger class Inner { + private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); + <clinit>() { + } + Inner() { + super(); + } + } + LoggerFloggerOuter() { + super(); + } +} diff --git a/test/transform/resource/after-ecj/NoPrivateNoArgsConstructor.java b/test/transform/resource/after-ecj/NoPrivateNoArgsConstructor.java new file mode 100644 index 00000000..a2bfe3bd --- /dev/null +++ b/test/transform/resource/after-ecj/NoPrivateNoArgsConstructor.java @@ -0,0 +1,68 @@ +public class NoPrivateNoArgsConstructor { + public static @lombok.Data class NoPrivateNoArgsConstructorData { + private final int i; + public @java.lang.SuppressWarnings("all") int getI() { + return this.i; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof NoPrivateNoArgsConstructor.NoPrivateNoArgsConstructorData))) + return false; + final NoPrivateNoArgsConstructor.NoPrivateNoArgsConstructorData other = (NoPrivateNoArgsConstructor.NoPrivateNoArgsConstructorData) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + if ((this.getI() != other.getI())) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { + return (other instanceof NoPrivateNoArgsConstructor.NoPrivateNoArgsConstructorData); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 59; + int result = 1; + result = ((result * PRIME) + this.getI()); + return result; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("NoPrivateNoArgsConstructor.NoPrivateNoArgsConstructorData(i=" + this.getI()) + ")"); + } + public @java.lang.SuppressWarnings("all") NoPrivateNoArgsConstructorData(final int i) { + super(); + this.i = i; + } + } + public static final @lombok.Value class NoPrivateNoArgsConstructorValue { + private final int i; + public @java.lang.SuppressWarnings("all") int getI() { + return this.i; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof NoPrivateNoArgsConstructor.NoPrivateNoArgsConstructorValue))) + return false; + final NoPrivateNoArgsConstructor.NoPrivateNoArgsConstructorValue other = (NoPrivateNoArgsConstructor.NoPrivateNoArgsConstructorValue) o; + if ((this.getI() != other.getI())) + return false; + return true; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 59; + int result = 1; + result = ((result * PRIME) + this.getI()); + return result; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("NoPrivateNoArgsConstructor.NoPrivateNoArgsConstructorValue(i=" + this.getI()) + ")"); + } + public @java.lang.SuppressWarnings("all") NoPrivateNoArgsConstructorValue(final int i) { + super(); + this.i = i; + } + } + public NoPrivateNoArgsConstructor() { + super(); + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/NonNullOnParameter.java b/test/transform/resource/after-ecj/NonNullOnParameter.java index bbceb153..fde47e1d 100644 --- a/test/transform/resource/after-ecj/NonNullOnParameter.java +++ b/test/transform/resource/after-ecj/NonNullOnParameter.java @@ -3,14 +3,14 @@ class NonNullOnParameter extends Thread { this(arg, ""); if ((arg == null)) { - throw new java.lang.NullPointerException("arg"); + throw new java.lang.NullPointerException("arg is marked @NonNull but is null"); } } NonNullOnParameter(@lombok.NonNull String arg, @lombok.NonNull String arg2) { super(arg); if ((arg2 == null)) { - throw new java.lang.NullPointerException("arg2"); + throw new java.lang.NullPointerException("arg2 is marked @NonNull but is null"); } if ((arg == null)) throw new NullPointerException(); @@ -18,11 +18,11 @@ class NonNullOnParameter extends Thread { public void test2(@lombok.NonNull String arg, @lombok.NonNull String arg2, @lombok.NonNull String arg3) { if ((arg == null)) { - throw new java.lang.NullPointerException("arg"); + throw new java.lang.NullPointerException("arg is marked @NonNull but is null"); } if ((arg3 == null)) { - throw new java.lang.NullPointerException("arg3"); + throw new java.lang.NullPointerException("arg3 is marked @NonNull but is null"); } if ((arg2 == null)) { @@ -34,7 +34,7 @@ class NonNullOnParameter extends Thread { public void test3(@lombok.NonNull String arg) { if ((arg == null)) { - throw new java.lang.NullPointerException("arg"); + throw new java.lang.NullPointerException("arg is marked @NonNull but is null"); } if ((arg != null)) throw new IllegalStateException(); @@ -42,17 +42,17 @@ class NonNullOnParameter extends Thread { public void test(@lombok.NonNull String stringArg, @lombok.NonNull String arg2, @lombok.NonNull int primitiveArg) { if ((stringArg == null)) { - throw new java.lang.NullPointerException("stringArg"); + throw new java.lang.NullPointerException("stringArg is marked @NonNull but is null"); } if ((arg2 == null)) { - throw new java.lang.NullPointerException("arg2"); + throw new java.lang.NullPointerException("arg2 is marked @NonNull but is null"); } } public void test(@lombok.NonNull String arg) { if ((arg == null)) { - throw new java.lang.NullPointerException("arg"); + throw new java.lang.NullPointerException("arg is marked @NonNull but is null"); } System.out.println("Hey"); if ((arg == null)) diff --git a/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java b/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java index a7dae247..d3e1fdd6 100644 --- a/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java +++ b/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java @@ -5,7 +5,7 @@ abstract class NonNullOnParameterAbstract { public void test(@lombok.NonNull String arg) { if ((arg == null)) { - throw new java.lang.NullPointerException("arg"); + throw new java.lang.NullPointerException("arg is marked @NonNull but is null"); } System.out.println("Hey"); } diff --git a/test/transform/resource/after-ecj/NonNullOnParameterOfDefaultMethod.java b/test/transform/resource/after-ecj/NonNullOnParameterOfDefaultMethod.java index 85e99702..7293bcf5 100644 --- a/test/transform/resource/after-ecj/NonNullOnParameterOfDefaultMethod.java +++ b/test/transform/resource/after-ecj/NonNullOnParameterOfDefaultMethod.java @@ -3,7 +3,7 @@ interface NonNullOnParameterOfDefaultMethod { default void test2(@lombok.NonNull String arg) { if ((arg == null)) { - throw new java.lang.NullPointerException("arg"); + throw new java.lang.NullPointerException("arg is marked @NonNull but is null"); } System.out.println(arg); } diff --git a/test/transform/resource/after-ecj/NonNullPlain.java b/test/transform/resource/after-ecj/NonNullPlain.java index 9edb576b..c703f38a 100644 --- a/test/transform/resource/after-ecj/NonNullPlain.java +++ b/test/transform/resource/after-ecj/NonNullPlain.java @@ -9,7 +9,7 @@ import java.lang.annotation.*; super(); if ((s == null)) { - throw new java.lang.NullPointerException("s"); + throw new java.lang.NullPointerException("s is marked @NonNull but is null"); } this.i = i; this.s = s; @@ -29,7 +29,7 @@ import java.lang.annotation.*; public @java.lang.SuppressWarnings("all") void setS(final @lombok.NonNull String s) { if ((s == null)) { - throw new java.lang.NullPointerException("s"); + throw new java.lang.NullPointerException("s is marked @NonNull but is null"); } this.s = s; } diff --git a/test/transform/resource/after-ecj/NonNullWithAlternateException.java b/test/transform/resource/after-ecj/NonNullWithAlternateException.java index 8a547ecf..39e9c0a8 100644 --- a/test/transform/resource/after-ecj/NonNullWithAlternateException.java +++ b/test/transform/resource/after-ecj/NonNullWithAlternateException.java @@ -6,14 +6,14 @@ public class NonNullWithAlternateException { public void testMethod(@lombok.NonNull String arg) { if ((arg == null)) { - throw new java.lang.IllegalArgumentException("arg is null"); + throw new java.lang.IllegalArgumentException("arg is marked @NonNull but is null"); } System.out.println(arg); } public @java.lang.SuppressWarnings("all") void setTest(final @lombok.NonNull String test) { if ((test == null)) { - throw new java.lang.IllegalArgumentException("test is null"); + throw new java.lang.IllegalArgumentException("test is marked @NonNull but is null"); } this.test = test; } diff --git a/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java b/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java index 1a57be29..22799b5e 100644 --- a/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java +++ b/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java @@ -7,7 +7,7 @@ class NonNullWithSneakyThrows { { if ((in == null)) { - throw new java.lang.NullPointerException("in"); + throw new java.lang.NullPointerException("in is marked @NonNull but is null"); } System.out.println(in); } diff --git a/test/transform/resource/after-ecj/PrivateNoArgsConstructor.java b/test/transform/resource/after-ecj/PrivateNoArgsConstructor.java new file mode 100644 index 00000000..f746ec9a --- /dev/null +++ b/test/transform/resource/after-ecj/PrivateNoArgsConstructor.java @@ -0,0 +1,219 @@ +public class PrivateNoArgsConstructor { + private static class Base { + private Base() { + super(); + } + } + public static @lombok.Data class PrivateNoArgsConstructorNotOnExtends extends Base { + private final int a; + public @java.lang.SuppressWarnings("all") int getA() { + return this.a; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorNotOnExtends))) + return false; + final PrivateNoArgsConstructor.PrivateNoArgsConstructorNotOnExtends other = (PrivateNoArgsConstructor.PrivateNoArgsConstructorNotOnExtends) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + if ((! super.equals(o))) + return false; + if ((this.getA() != other.getA())) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { + return (other instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorNotOnExtends); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = ((result * PRIME) + this.getA()); + return result; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("PrivateNoArgsConstructor.PrivateNoArgsConstructorNotOnExtends(a=" + this.getA()) + ")"); + } + public @java.lang.SuppressWarnings("all") PrivateNoArgsConstructorNotOnExtends(final int a) { + super(); + this.a = a; + } + } + public static @lombok.Data class PrivateNoArgsConstructorOnExtendsObject extends Object { + private final int b; + public @java.lang.SuppressWarnings("all") int getB() { + return this.b; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorOnExtendsObject))) + return false; + final PrivateNoArgsConstructor.PrivateNoArgsConstructorOnExtendsObject other = (PrivateNoArgsConstructor.PrivateNoArgsConstructorOnExtendsObject) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + if ((this.getB() != other.getB())) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { + return (other instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorOnExtendsObject); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 59; + int result = 1; + result = ((result * PRIME) + this.getB()); + return result; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("PrivateNoArgsConstructor.PrivateNoArgsConstructorOnExtendsObject(b=" + this.getB()) + ")"); + } + public @java.lang.SuppressWarnings("all") PrivateNoArgsConstructorOnExtendsObject(final int b) { + super(); + this.b = b; + } + private @java.lang.SuppressWarnings("all") PrivateNoArgsConstructorOnExtendsObject() { + super(); + this.b = 0; + } + } + public static @lombok.NoArgsConstructor(force = true) @lombok.Data @lombok.RequiredArgsConstructor class PrivateNoArgsConstructorExplicitBefore { + private final int c; + public @java.lang.SuppressWarnings("all") PrivateNoArgsConstructorExplicitBefore() { + super(); + this.c = 0; + } + public @java.lang.SuppressWarnings("all") int getC() { + return this.c; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitBefore))) + return false; + final PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitBefore other = (PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitBefore) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + if ((this.getC() != other.getC())) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { + return (other instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitBefore); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 59; + int result = 1; + result = ((result * PRIME) + this.getC()); + return result; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitBefore(c=" + this.getC()) + ")"); + } + public @java.lang.SuppressWarnings("all") PrivateNoArgsConstructorExplicitBefore(final int c) { + super(); + this.c = c; + } + } + public static @lombok.Data @lombok.NoArgsConstructor(force = true) @lombok.RequiredArgsConstructor class PrivateNoArgsConstructorExplicitAfter { + private final int d; + public @java.lang.SuppressWarnings("all") int getD() { + return this.d; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitAfter))) + return false; + final PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitAfter other = (PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitAfter) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + if ((this.getD() != other.getD())) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { + return (other instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitAfter); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 59; + int result = 1; + result = ((result * PRIME) + this.getD()); + return result; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitAfter(d=" + this.getD()) + ")"); + } + public @java.lang.SuppressWarnings("all") PrivateNoArgsConstructorExplicitAfter() { + super(); + this.d = 0; + } + public @java.lang.SuppressWarnings("all") PrivateNoArgsConstructorExplicitAfter(final int d) { + super(); + this.d = d; + } + } + public static @lombok.Data @lombok.NoArgsConstructor(access = lombok.AccessLevel.NONE) @lombok.RequiredArgsConstructor class PrivateNoArgsConstructorExplicitNone { + private final int e; + public @java.lang.SuppressWarnings("all") int getE() { + return this.e; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitNone))) + return false; + final PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitNone other = (PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitNone) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + if ((this.getE() != other.getE())) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { + return (other instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitNone); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 59; + int result = 1; + result = ((result * PRIME) + this.getE()); + return result; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitNone(e=" + this.getE()) + ")"); + } + public @java.lang.SuppressWarnings("all") PrivateNoArgsConstructorExplicitNone(final int e) { + super(); + this.e = e; + } + } + public static @lombok.Data class PrivateNoArgsConstructorNoFields { + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorNoFields))) + return false; + final PrivateNoArgsConstructor.PrivateNoArgsConstructorNoFields other = (PrivateNoArgsConstructor.PrivateNoArgsConstructorNoFields) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { + return (other instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorNoFields); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + int result = 1; + return result; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return "PrivateNoArgsConstructor.PrivateNoArgsConstructorNoFields()"; + } + public @java.lang.SuppressWarnings("all") PrivateNoArgsConstructorNoFields() { + super(); + } + } + public PrivateNoArgsConstructor() { + super(); + } +} diff --git a/test/transform/resource/after-ecj/SetterOnClass.java b/test/transform/resource/after-ecj/SetterOnClass.java index aa3459bb..c7aec900 100644 --- a/test/transform/resource/after-ecj/SetterOnClass.java +++ b/test/transform/resource/after-ecj/SetterOnClass.java @@ -64,7 +64,7 @@ public @java.lang.SuppressWarnings("all") void setNonNull(final @lombok.NonNull String nonNull) { if ((nonNull == null)) { - throw new java.lang.NullPointerException("nonNull"); + throw new java.lang.NullPointerException("nonNull is marked @NonNull but is null"); } this.nonNull = nonNull; } diff --git a/test/transform/resource/after-ecj/ToStringNewStyle.java b/test/transform/resource/after-ecj/ToStringNewStyle.java new file mode 100644 index 00000000..cdc6f5bc --- /dev/null +++ b/test/transform/resource/after-ecj/ToStringNewStyle.java @@ -0,0 +1,20 @@ +import lombok.ToString; +public @ToString class ToStringNewStyle { + @ToString.Include(name = "a") int b; + double c; + int f; + @ToString.Include(name = "e") int d; + int g; + @ToString.Include(rank = (- 1)) int h; + int i; + @ToString.Exclude int j; + public ToStringNewStyle() { + super(); + } + @ToString.Include int f() { + return 0; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((((((((((((("ToStringNewStyle(a=" + this.b) + ", c=") + this.c) + ", e=") + this.d) + ", f=") + this.f()) + ", g=") + this.g) + ", i=") + this.i) + ", h=") + this.h) + ")"); + } +} diff --git a/test/transform/resource/after-ecj/WitherOnClass.java b/test/transform/resource/after-ecj/WitherOnClass.java index 82132e87..086ba591 100644 --- a/test/transform/resource/after-ecj/WitherOnClass.java +++ b/test/transform/resource/after-ecj/WitherOnClass.java @@ -34,7 +34,7 @@ public @java.lang.SuppressWarnings("all") WitherOnClass3 withNonNull(final @lombok.NonNull String nonNull) { if ((nonNull == null)) { - throw new java.lang.NullPointerException("nonNull"); + throw new java.lang.NullPointerException("nonNull is marked @NonNull but is null"); } return ((this.nonNull == nonNull) ? this : new WitherOnClass3(this.couldBeNull, nonNull)); } |