diff options
Diffstat (limited to 'test/transform')
9 files changed, 133 insertions, 5 deletions
diff --git a/test/transform/resource/after-delombok/Constructors.java b/test/transform/resource/after-delombok/Constructors.java index 12aa75ab..4ffdc62b 100644 --- a/test/transform/resource/after-delombok/Constructors.java +++ b/test/transform/resource/after-delombok/Constructors.java @@ -58,12 +58,10 @@ class NoArgsConstructor1 { class RequiredArgsConstructorStaticNameGenerics<T extends Number> { final T x; String name; - @java.lang.SuppressWarnings("all") private RequiredArgsConstructorStaticNameGenerics(final T x) { this.x = x; } - @java.lang.SuppressWarnings("all") public static <T extends Number> RequiredArgsConstructorStaticNameGenerics<T> of(final T x) { return new RequiredArgsConstructorStaticNameGenerics<T>(x); @@ -72,14 +70,19 @@ class RequiredArgsConstructorStaticNameGenerics<T extends Number> { class RequiredArgsConstructorStaticNameGenerics2<T extends Number> { final Class<T> x; String name; - @java.lang.SuppressWarnings("all") private RequiredArgsConstructorStaticNameGenerics2(final Class<T> x) { this.x = x; } - @java.lang.SuppressWarnings("all") public static <T extends Number> RequiredArgsConstructorStaticNameGenerics2<T> of(final Class<T> x) { return new RequiredArgsConstructorStaticNameGenerics2<T>(x); } -}
\ No newline at end of file +} +class AllArgsConstructorPackageAccess { + final String x; + @java.lang.SuppressWarnings("all") + AllArgsConstructorPackageAccess(final String x) { + this.x = x; + } +} diff --git a/test/transform/resource/after-delombok/ConstructorsConfiguration.java b/test/transform/resource/after-delombok/ConstructorsConfiguration.java new file mode 100644 index 00000000..5bec3ae3 --- /dev/null +++ b/test/transform/resource/after-delombok/ConstructorsConfiguration.java @@ -0,0 +1,15 @@ +class ConstructorsConfiguration { + int x; + @java.lang.SuppressWarnings("all") + public ConstructorsConfiguration(final int x) { + this.x = x; + } +} +class ConstructorsConfigurationExplicit { + int x; + @java.beans.ConstructorProperties({"x"}) + @java.lang.SuppressWarnings("all") + public ConstructorsConfigurationExplicit(final int x) { + this.x = x; + } +} diff --git a/test/transform/resource/after-delombok/DataConfiguration.java b/test/transform/resource/after-delombok/DataConfiguration.java new file mode 100644 index 00000000..230083ec --- /dev/null +++ b/test/transform/resource/after-delombok/DataConfiguration.java @@ -0,0 +1,38 @@ +class DataConfiguration { + final int x; + @java.lang.SuppressWarnings("all") + public DataConfiguration(final int x) { + this.x = x; + } + @java.lang.SuppressWarnings("all") + public int getX() { + return this.x; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public boolean equals(final java.lang.Object o) { + if (o == this) return true; + if (!(o instanceof DataConfiguration)) return false; + final DataConfiguration other = (DataConfiguration)o; + if (!other.canEqual((java.lang.Object)this)) return false; + if (this.getX() != other.getX()) return false; + return true; + } + @java.lang.SuppressWarnings("all") + protected boolean canEqual(final java.lang.Object other) { + return other instanceof DataConfiguration; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = result * PRIME + this.getX(); + return result; + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "DataConfiguration(x=" + this.getX() + ")"; + } +} diff --git a/test/transform/resource/after-ecj/Constructors.java b/test/transform/resource/after-ecj/Constructors.java index 540c2407..a4597ce6 100644 --- a/test/transform/resource/after-ecj/Constructors.java +++ b/test/transform/resource/after-ecj/Constructors.java @@ -70,4 +70,11 @@ public static @java.lang.SuppressWarnings("all") <T extends Number>RequiredArgsConstructorStaticNameGenerics2<T> of(final Class<T> x) { return new RequiredArgsConstructorStaticNameGenerics2<T>(x); } +} +@lombok.AllArgsConstructor(access = lombok.AccessLevel.PACKAGE) class AllArgsConstructorPackageAccess { + final String x; + @java.lang.SuppressWarnings("all") AllArgsConstructorPackageAccess(final String x) { + super(); + this.x = x; + } }
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/ConstructorsConfiguration.java b/test/transform/resource/after-ecj/ConstructorsConfiguration.java new file mode 100644 index 00000000..b55d3e03 --- /dev/null +++ b/test/transform/resource/after-ecj/ConstructorsConfiguration.java @@ -0,0 +1,14 @@ +@lombok.AllArgsConstructor class ConstructorsConfiguration { + int x; + public @java.lang.SuppressWarnings("all") ConstructorsConfiguration(final int x) { + super(); + this.x = x; + } +} +@lombok.AllArgsConstructor(suppressConstructorProperties = false) class ConstructorsConfigurationExplicit { + int x; + public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") ConstructorsConfigurationExplicit(final int x) { + super(); + this.x = x; + } +} diff --git a/test/transform/resource/after-ecj/DataConfiguration.java b/test/transform/resource/after-ecj/DataConfiguration.java new file mode 100644 index 00000000..f2733a88 --- /dev/null +++ b/test/transform/resource/after-ecj/DataConfiguration.java @@ -0,0 +1,34 @@ +@lombok.Data class DataConfiguration { + final int x; + public @java.lang.SuppressWarnings("all") int getX() { + return this.x; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((! (o instanceof DataConfiguration))) + return false; + final @java.lang.SuppressWarnings("all") DataConfiguration other = (DataConfiguration) o; + if ((! other.canEqual((java.lang.Object) this))) + return false; + if ((this.getX() != other.getX())) + return false; + return true; + } + protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { + return (other instanceof DataConfiguration); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 59; + int result = 1; + result = ((result * PRIME) + this.getX()); + return result; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("DataConfiguration(x=" + this.getX()) + ")"); + } + public @java.lang.SuppressWarnings("all") DataConfiguration(final int x) { + super(); + this.x = x; + } +} diff --git a/test/transform/resource/before/Constructors.java b/test/transform/resource/before/Constructors.java index 45b3a199..c80acf2b 100644 --- a/test/transform/resource/before/Constructors.java +++ b/test/transform/resource/before/Constructors.java @@ -30,3 +30,6 @@ final Class<T> x; String name; } +@lombok.AllArgsConstructor(access=lombok.AccessLevel.PACKAGE) class AllArgsConstructorPackageAccess { + final String x; +}
\ No newline at end of file diff --git a/test/transform/resource/before/ConstructorsConfiguration.java b/test/transform/resource/before/ConstructorsConfiguration.java new file mode 100644 index 00000000..8fae10fc --- /dev/null +++ b/test/transform/resource/before/ConstructorsConfiguration.java @@ -0,0 +1,9 @@ +//CONF: lombok.anyConstructor.suppressConstructorProperties = true +@lombok.AllArgsConstructor +class ConstructorsConfiguration { + int x; +} +@lombok.AllArgsConstructor(suppressConstructorProperties=false) +class ConstructorsConfigurationExplicit { + int x; +} diff --git a/test/transform/resource/before/DataConfiguration.java b/test/transform/resource/before/DataConfiguration.java new file mode 100644 index 00000000..660d6d18 --- /dev/null +++ b/test/transform/resource/before/DataConfiguration.java @@ -0,0 +1,5 @@ +//CONF: lombok.anyConstructor.suppressConstructorProperties = true +@lombok.Data +class DataConfiguration { + final int x; +} |