diff options
Diffstat (limited to 'test/transform')
22 files changed, 754 insertions, 7 deletions
diff --git a/test/transform/resource/after-delombok/DataConfiguration.java b/test/transform/resource/after-delombok/DataConfiguration.java index b71e1c81..6771a6a7 100644 --- a/test/transform/resource/after-delombok/DataConfiguration.java +++ b/test/transform/resource/after-delombok/DataConfiguration.java @@ -5,6 +5,10 @@ class DataConfiguration { this.x = x; } @java.lang.SuppressWarnings("all") + private DataConfiguration() { + this.x = 0; + } + @java.lang.SuppressWarnings("all") public int getX() { return this.x; } diff --git a/test/transform/resource/after-delombok/FieldNameConstantsBasic.java b/test/transform/resource/after-delombok/FieldNameConstantsBasic.java index de5d68c6..4e547aa5 100644 --- a/test/transform/resource/after-delombok/FieldNameConstantsBasic.java +++ b/test/transform/resource/after-delombok/FieldNameConstantsBasic.java @@ -1,6 +1,6 @@ public class FieldNameConstantsBasic { - protected static final java.lang.String I_AM_A_DVD_PLAYER = "iAmADvdPlayer"; - public static final java.lang.String BUT_PRINT_ME_PLEASE = "butPrintMePlease"; + protected static final java.lang.String FIELD_I_AM_A_DVD_PLAYER = "iAmADvdPlayer"; + public static final java.lang.String FIELD_BUT_PRINT_ME_PLEASE = "butPrintMePlease"; String iAmADvdPlayer; int $skipMe; static double skipMeToo; diff --git a/test/transform/resource/after-delombok/FieldNameConstantsConfigKeys.java b/test/transform/resource/after-delombok/FieldNameConstantsConfigKeys.java new file mode 100644 index 00000000..c71b9264 --- /dev/null +++ b/test/transform/resource/after-delombok/FieldNameConstantsConfigKeys.java @@ -0,0 +1,4 @@ +public class FieldNameConstantsConfigKeys { + public static final java.lang.String I_AM_A_DVD_PLAYER_SFX = "iAmADvdPlayer"; + String iAmADvdPlayer; +} diff --git a/test/transform/resource/after-delombok/FieldNameConstantsWeird.java b/test/transform/resource/after-delombok/FieldNameConstantsWeird.java index a256f5ba..6940f628 100644 --- a/test/transform/resource/after-delombok/FieldNameConstantsWeird.java +++ b/test/transform/resource/after-delombok/FieldNameConstantsWeird.java @@ -1,4 +1,6 @@ public class FieldNameConstantsWeird { + public static final java.lang.String FIELD_AZ = "A"; String iAmADvdPlayer; String X; + String A; } diff --git a/test/transform/resource/after-delombok/LoggerFlogger.java b/test/transform/resource/after-delombok/LoggerFlogger.java new file mode 100644 index 00000000..41d49fe4 --- /dev/null +++ b/test/transform/resource/after-delombok/LoggerFlogger.java @@ -0,0 +1,14 @@ +class LoggerFlogger { + @java.lang.SuppressWarnings("all") + private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); +} +class LoggerFloggerWithImport { + @java.lang.SuppressWarnings("all") + private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); +} +class LoggerFloggerOuter { + static class Inner { + @java.lang.SuppressWarnings("all") + private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); + } +} diff --git a/test/transform/resource/after-delombok/NoPrivateNoArgsConstructor.java b/test/transform/resource/after-delombok/NoPrivateNoArgsConstructor.java new file mode 100644 index 00000000..b354a85d --- /dev/null +++ b/test/transform/resource/after-delombok/NoPrivateNoArgsConstructor.java @@ -0,0 +1,73 @@ +public class NoPrivateNoArgsConstructor { + public static class NoPrivateNoArgsConstructorData { + private final int i; + @java.lang.SuppressWarnings("all") + public NoPrivateNoArgsConstructorData(final int i) { + this.i = i; + } + @java.lang.SuppressWarnings("all") + public int getI() { + return this.i; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public 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; + } + @java.lang.SuppressWarnings("all") + protected boolean canEqual(final java.lang.Object other) { + return other instanceof NoPrivateNoArgsConstructor.NoPrivateNoArgsConstructorData; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * PRIME + this.getI(); + return result; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "NoPrivateNoArgsConstructor.NoPrivateNoArgsConstructorData(i=" + this.getI() + ")"; + } + } + public static final class NoPrivateNoArgsConstructorValue { + private final int i; + @java.lang.SuppressWarnings("all") + public NoPrivateNoArgsConstructorValue(final int i) { + this.i = i; + } + @java.lang.SuppressWarnings("all") + public int getI() { + return this.i; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public 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; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * PRIME + this.getI(); + return result; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "NoPrivateNoArgsConstructor.NoPrivateNoArgsConstructorValue(i=" + this.getI() + ")"; + } + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/PrivateNoArgsConstructor.java b/test/transform/resource/after-delombok/PrivateNoArgsConstructor.java new file mode 100644 index 00000000..18e6f211 --- /dev/null +++ b/test/transform/resource/after-delombok/PrivateNoArgsConstructor.java @@ -0,0 +1,236 @@ +public class PrivateNoArgsConstructor { + private static class Base { + } + public static class PrivateNoArgsConstructorNotOnExtends extends Base { + private final int a; + @java.lang.SuppressWarnings("all") + public PrivateNoArgsConstructorNotOnExtends(final int a) { + this.a = a; + } + @java.lang.SuppressWarnings("all") + public int getA() { + return this.a; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public 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; + } + @java.lang.SuppressWarnings("all") + protected boolean canEqual(final java.lang.Object other) { + return other instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorNotOnExtends; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = result * PRIME + this.getA(); + return result; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "PrivateNoArgsConstructor.PrivateNoArgsConstructorNotOnExtends(a=" + this.getA() + ")"; + } + } + public static class PrivateNoArgsConstructorOnExtendsObject extends Object { + private final int b; + @java.lang.SuppressWarnings("all") + public PrivateNoArgsConstructorOnExtendsObject(final int b) { + this.b = b; + } + @java.lang.SuppressWarnings("all") + private PrivateNoArgsConstructorOnExtendsObject() { + this.b = 0; + } + @java.lang.SuppressWarnings("all") + public int getB() { + return this.b; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public 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; + } + @java.lang.SuppressWarnings("all") + protected boolean canEqual(final java.lang.Object other) { + return other instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorOnExtendsObject; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * PRIME + this.getB(); + return result; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "PrivateNoArgsConstructor.PrivateNoArgsConstructorOnExtendsObject(b=" + this.getB() + ")"; + } + } + public static class PrivateNoArgsConstructorExplicitBefore { + private final int c; + @java.lang.SuppressWarnings("all") + public PrivateNoArgsConstructorExplicitBefore() { + this.c = 0; + } + @java.lang.SuppressWarnings("all") + public int getC() { + return this.c; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public 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; + } + @java.lang.SuppressWarnings("all") + protected boolean canEqual(final java.lang.Object other) { + return other instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitBefore; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * PRIME + this.getC(); + return result; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitBefore(c=" + this.getC() + ")"; + } + @java.lang.SuppressWarnings("all") + public PrivateNoArgsConstructorExplicitBefore(final int c) { + this.c = c; + } + } + public static class PrivateNoArgsConstructorExplicitAfter { + private final int d; + @java.lang.SuppressWarnings("all") + public int getD() { + return this.d; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public 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; + } + @java.lang.SuppressWarnings("all") + protected boolean canEqual(final java.lang.Object other) { + return other instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitAfter; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * PRIME + this.getD(); + return result; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitAfter(d=" + this.getD() + ")"; + } + @java.lang.SuppressWarnings("all") + public PrivateNoArgsConstructorExplicitAfter() { + this.d = 0; + } + @java.lang.SuppressWarnings("all") + public PrivateNoArgsConstructorExplicitAfter(final int d) { + this.d = d; + } + } + public static class PrivateNoArgsConstructorExplicitNone { + private final int e; + @java.lang.SuppressWarnings("all") + public int getE() { + return this.e; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public 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; + } + @java.lang.SuppressWarnings("all") + protected boolean canEqual(final java.lang.Object other) { + return other instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitNone; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * PRIME + this.getE(); + return result; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "PrivateNoArgsConstructor.PrivateNoArgsConstructorExplicitNone(e=" + this.getE() + ")"; + } + @java.lang.SuppressWarnings("all") + public PrivateNoArgsConstructorExplicitNone(final int e) { + this.e = e; + } + } + public static class PrivateNoArgsConstructorNoFields { + @java.lang.SuppressWarnings("all") + public PrivateNoArgsConstructorNoFields() { + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public 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; + } + @java.lang.SuppressWarnings("all") + protected boolean canEqual(final java.lang.Object other) { + return other instanceof PrivateNoArgsConstructor.PrivateNoArgsConstructorNoFields; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public int hashCode() { + int result = 1; + return result; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "PrivateNoArgsConstructor.PrivateNoArgsConstructorNoFields()"; + } + } +} 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/FieldNameConstantsBasic.java b/test/transform/resource/after-ecj/FieldNameConstantsBasic.java index bfa339fb..f77203ba 100644 --- a/test/transform/resource/after-ecj/FieldNameConstantsBasic.java +++ b/test/transform/resource/after-ecj/FieldNameConstantsBasic.java @@ -1,8 +1,8 @@ import lombok.experimental.FieldNameConstants; import lombok.AccessLevel; public @FieldNameConstants class FieldNameConstantsBasic { - public static final java.lang.String BUT_PRINT_ME_PLEASE = "butPrintMePlease"; - protected static final java.lang.String I_AM_A_DVD_PLAYER = "iAmADvdPlayer"; + 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; 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 index c581b7ef..9958f664 100644 --- a/test/transform/resource/after-ecj/FieldNameConstantsWeird.java +++ b/test/transform/resource/after-ecj/FieldNameConstantsWeird.java @@ -1,8 +1,12 @@ 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; - String X; + @FieldNameConstants(prefix = "") String X; + @FieldNameConstants(suffix = "Z") String A; + <clinit>() { + } public FieldNameConstantsWeird() { super(); } 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/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/before/DataConfiguration.java b/test/transform/resource/before/DataConfiguration.java index 8b9657f9..9e0bd420 100644 --- a/test/transform/resource/before/DataConfiguration.java +++ b/test/transform/resource/before/DataConfiguration.java @@ -1,6 +1,7 @@ //CONF: lombok.anyConstructor.suppressConstructorProperties = true //CONF: lombok.toString.doNotUseGetters = true //CONF: lombok.equalsAndHashCode.doNotUseGetters = true +//CONF: lombok.noArgsConstructor.extraPrivate = true @lombok.Data class DataConfiguration { final int x; diff --git a/test/transform/resource/before/FieldNameConstantsConfigKeys.java b/test/transform/resource/before/FieldNameConstantsConfigKeys.java new file mode 100644 index 00000000..ab8e3091 --- /dev/null +++ b/test/transform/resource/before/FieldNameConstantsConfigKeys.java @@ -0,0 +1,7 @@ +//CONF: lombok.fieldNameConstants.prefix = +//CONF: lombok.fieldNameConstants.suffix = _SFX + +@lombok.experimental.FieldNameConstants +public class FieldNameConstantsConfigKeys { + String iAmADvdPlayer; +} diff --git a/test/transform/resource/before/FieldNameConstantsWeird.java b/test/transform/resource/before/FieldNameConstantsWeird.java index 0f99133d..74ec299a 100644 --- a/test/transform/resource/before/FieldNameConstantsWeird.java +++ b/test/transform/resource/before/FieldNameConstantsWeird.java @@ -5,5 +5,8 @@ import lombok.AccessLevel; public class FieldNameConstantsWeird { @FieldNameConstants(level = AccessLevel.NONE) String iAmADvdPlayer; + @FieldNameConstants(prefix = "") String X; + @FieldNameConstants(suffix = "Z") + String A; } diff --git a/test/transform/resource/before/LoggerFlogger.java b/test/transform/resource/before/LoggerFlogger.java new file mode 100644 index 00000000..b143aae9 --- /dev/null +++ b/test/transform/resource/before/LoggerFlogger.java @@ -0,0 +1,16 @@ +import lombok.extern.flogger.Flogger; + +@lombok.extern.flogger.Flogger +class LoggerFlogger { +} + +@Flogger +class LoggerFloggerWithImport { +} + +class LoggerFloggerOuter { + @lombok.extern.flogger.Flogger + static class Inner { + + } +} diff --git a/test/transform/resource/before/NoPrivateNoArgsConstructor.java b/test/transform/resource/before/NoPrivateNoArgsConstructor.java new file mode 100644 index 00000000..b7c2a616 --- /dev/null +++ b/test/transform/resource/before/NoPrivateNoArgsConstructor.java @@ -0,0 +1,12 @@ +//CONF: lombok.noArgsConstructor.extraPrivate = false +public class NoPrivateNoArgsConstructor { + @lombok.Data + public static class NoPrivateNoArgsConstructorData { + private final int i; + } + + @lombok.Value + public static class NoPrivateNoArgsConstructorValue { + int i; + } +} diff --git a/test/transform/resource/before/PrivateNoArgsConstructor.java b/test/transform/resource/before/PrivateNoArgsConstructor.java new file mode 100644 index 00000000..38f5aed0 --- /dev/null +++ b/test/transform/resource/before/PrivateNoArgsConstructor.java @@ -0,0 +1,41 @@ +// CONF: lombok.noArgsConstructor.extraPrivate = true +// CONF: lombok.equalsAndHashCode.callSuper = call +public class PrivateNoArgsConstructor { + private static class Base { + } + + @lombok.Data + public static class PrivateNoArgsConstructorNotOnExtends extends Base { + private final int a; + } + + @lombok.Data + public static class PrivateNoArgsConstructorOnExtendsObject extends Object { + private final int b; + } + + @lombok.NoArgsConstructor(force=true) + @lombok.Data + @lombok.RequiredArgsConstructor + public static class PrivateNoArgsConstructorExplicitBefore { + private final int c; + } + + @lombok.Data + @lombok.NoArgsConstructor(force=true) + @lombok.RequiredArgsConstructor + public static class PrivateNoArgsConstructorExplicitAfter { + private final int d; + } + + @lombok.Data + @lombok.NoArgsConstructor(access=lombok.AccessLevel.NONE) + @lombok.RequiredArgsConstructor + public static class PrivateNoArgsConstructorExplicitNone { + private final int e; + } + + @lombok.Data + public static class PrivateNoArgsConstructorNoFields { + } +} diff --git a/test/transform/resource/messages-delombok/FieldNameConstantsWeird.java.messages b/test/transform/resource/messages-delombok/FieldNameConstantsWeird.java.messages index d5fc44f5..02a38d58 100644 --- a/test/transform/resource/messages-delombok/FieldNameConstantsWeird.java.messages +++ b/test/transform/resource/messages-delombok/FieldNameConstantsWeird.java.messages @@ -1 +1 @@ -8 Not generating constant for this field: The name of the constant would be equal to the name of this field. +9 Not generating constant for this field: The name of the constant would be equal to the name of this field. diff --git a/test/transform/resource/messages-ecj/FieldNameConstantsWeird.java.messages b/test/transform/resource/messages-ecj/FieldNameConstantsWeird.java.messages index d5fc44f5..02a38d58 100644 --- a/test/transform/resource/messages-ecj/FieldNameConstantsWeird.java.messages +++ b/test/transform/resource/messages-ecj/FieldNameConstantsWeird.java.messages @@ -1 +1 @@ -8 Not generating constant for this field: The name of the constant would be equal to the name of this field. +9 Not generating constant for this field: The name of the constant would be equal to the name of this field. |