aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-ecj')
-rw-r--r--test/transform/resource/after-ecj/Accessors.java2
-rw-r--r--test/transform/resource/after-ecj/BuilderSingularNoAuto.java (renamed from test/transform/resource/after-ecj/BuilderSingularNoAutosingularize.java)30
-rw-r--r--test/transform/resource/after-ecj/BuilderWithToBuilder.java150
-rw-r--r--test/transform/resource/after-ecj/Constructors.java18
-rw-r--r--test/transform/resource/after-ecj/DataOnLocalClass.java4
-rw-r--r--test/transform/resource/after-ecj/DataPlain.java6
-rw-r--r--test/transform/resource/after-ecj/DataWithGetter.java2
-rw-r--r--test/transform/resource/after-ecj/DataWithGetterNone.java2
-rw-r--r--test/transform/resource/after-ecj/EqualsAndHashCode.java4
-rw-r--r--test/transform/resource/after-ecj/EqualsAndHashCodeWithOnParam.java4
-rw-r--r--test/transform/resource/after-ecj/EqualsAndHashcodeOfExclude.java46
-rw-r--r--test/transform/resource/after-ecj/FieldDefaultsViaConfig.java15
-rw-r--r--test/transform/resource/after-ecj/FieldDefaultsViaConfigAndRequiredArgsConstructor.java7
-rw-r--r--test/transform/resource/after-ecj/GetterLazyEahcToString.java4
-rw-r--r--test/transform/resource/after-ecj/GetterSetterJavadoc.java26
-rw-r--r--test/transform/resource/after-ecj/Helper.java26
-rw-r--r--test/transform/resource/after-ecj/NonNullOnParameterOfDefaultMethod.java10
-rw-r--r--test/transform/resource/after-ecj/UtilityClass.java10
-rw-r--r--test/transform/resource/after-ecj/UtilityClassErrors.java2
-rw-r--r--test/transform/resource/after-ecj/ValuePlain.java4
-rw-r--r--test/transform/resource/after-ecj/ValueStaticField.java24
21 files changed, 364 insertions, 32 deletions
diff --git a/test/transform/resource/after-ecj/Accessors.java b/test/transform/resource/after-ecj/Accessors.java
index 1b50c97e..450c35fa 100644
--- a/test/transform/resource/after-ecj/Accessors.java
+++ b/test/transform/resource/after-ecj/Accessors.java
@@ -93,7 +93,7 @@ class AccessorsChain {
final int PRIME = 59;
int result = 1;
final java.lang.Object $fName = this.getName();
- result = ((result * PRIME) + (($fName == null) ? 0 : $fName.hashCode()));
+ result = ((result * PRIME) + (($fName == null) ? 43 : $fName.hashCode()));
return result;
}
}
diff --git a/test/transform/resource/after-ecj/BuilderSingularNoAutosingularize.java b/test/transform/resource/after-ecj/BuilderSingularNoAuto.java
index 0e0594e4..d5b06f1e 100644
--- a/test/transform/resource/after-ecj/BuilderSingularNoAutosingularize.java
+++ b/test/transform/resource/after-ecj/BuilderSingularNoAuto.java
@@ -1,50 +1,50 @@
import java.util.List;
import lombok.Singular;
-@lombok.Builder class BuilderSingularNoAutosingularize {
- public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderSingularNoAutosingularizeBuilder {
+@lombok.Builder class BuilderSingularNoAuto {
+ public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderSingularNoAutoBuilder {
private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList<String> things;
private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList<String> widgets;
private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList<String> items;
- @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutosingularizeBuilder() {
+ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder() {
super();
}
- public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutosingularizeBuilder things(String things) {
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder things(String things) {
if ((this.things == null))
this.things = new java.util.ArrayList<String>();
this.things.add(things);
return this;
}
- public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutosingularizeBuilder things(java.util.Collection<? extends String> things) {
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder things(java.util.Collection<? extends String> things) {
if ((this.things == null))
this.things = new java.util.ArrayList<String>();
this.things.addAll(things);
return this;
}
- public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutosingularizeBuilder widget(String widget) {
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder widget(String widget) {
if ((this.widgets == null))
this.widgets = new java.util.ArrayList<String>();
this.widgets.add(widget);
return this;
}
- public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutosingularizeBuilder widgets(java.util.Collection<? extends String> widgets) {
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder widgets(java.util.Collection<? extends String> widgets) {
if ((this.widgets == null))
this.widgets = new java.util.ArrayList<String>();
this.widgets.addAll(widgets);
return this;
}
- public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutosingularizeBuilder items(String items) {
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder items(String items) {
if ((this.items == null))
this.items = new java.util.ArrayList<String>();
this.items.add(items);
return this;
}
- public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutosingularizeBuilder items(java.util.Collection<? extends String> items) {
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder items(java.util.Collection<? extends String> items) {
if ((this.items == null))
this.items = new java.util.ArrayList<String>();
this.items.addAll(items);
return this;
}
- public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutosingularize build() {
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAuto build() {
java.util.List<String> things;
switch (((this.things == null) ? 0 : this.things.size())) {
case 0 :
@@ -78,22 +78,22 @@ import lombok.Singular;
default :
items = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.items));
}
- return new BuilderSingularNoAutosingularize(things, widgets, items);
+ return new BuilderSingularNoAuto(things, widgets, items);
}
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
- return (((((("BuilderSingularNoAutosingularize.BuilderSingularNoAutosingularizeBuilder(things=" + this.things) + ", widgets=") + this.widgets) + ", items=") + this.items) + ")");
+ return (((((("BuilderSingularNoAuto.BuilderSingularNoAutoBuilder(things=" + this.things) + ", widgets=") + this.widgets) + ", items=") + this.items) + ")");
}
}
private @Singular List<String> things;
private @Singular("widget") List<String> widgets;
private @Singular List<String> items;
- @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutosingularize(final List<String> things, final List<String> widgets, final List<String> items) {
+ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAuto(final List<String> things, final List<String> widgets, final List<String> items) {
super();
this.things = things;
this.widgets = widgets;
this.items = items;
}
- public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutosingularizeBuilder builder() {
- return new BuilderSingularNoAutosingularizeBuilder();
+ public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderSingularNoAutoBuilder builder() {
+ return new BuilderSingularNoAutoBuilder();
}
}
diff --git a/test/transform/resource/after-ecj/BuilderWithToBuilder.java b/test/transform/resource/after-ecj/BuilderWithToBuilder.java
new file mode 100644
index 00000000..423865ff
--- /dev/null
+++ b/test/transform/resource/after-ecj/BuilderWithToBuilder.java
@@ -0,0 +1,150 @@
+import java.util.List;
+import lombok.Builder;
+@Builder(toBuilder = true) @lombok.experimental.Accessors(prefix = "m") class BuilderWithToBuilder<T> {
+ public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class BuilderWithToBuilderBuilder<T> {
+ private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String one;
+ private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String two;
+ private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") T foo;
+ private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.util.ArrayList<T> bars;
+ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder<T> one(final String one) {
+ this.one = one;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder<T> two(final String two) {
+ this.two = two;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder<T> foo(final T foo) {
+ this.foo = foo;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder<T> bar(T bar) {
+ if ((this.bars == null))
+ this.bars = new java.util.ArrayList<T>();
+ this.bars.add(bar);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder<T> bars(java.util.Collection<? extends T> bars) {
+ if ((this.bars == null))
+ this.bars = new java.util.ArrayList<T>();
+ this.bars.addAll(bars);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilder<T> build() {
+ java.util.List<T> bars;
+ switch (((this.bars == null) ? 0 : this.bars.size())) {
+ case 0 :
+ bars = java.util.Collections.emptyList();
+ break;
+ case 1 :
+ bars = java.util.Collections.singletonList(this.bars.get(0));
+ break;
+ default :
+ bars = java.util.Collections.unmodifiableList(new java.util.ArrayList<T>(this.bars));
+ }
+ return new BuilderWithToBuilder<T>(one, two, foo, bars);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
+ return (((((((("BuilderWithToBuilder.BuilderWithToBuilderBuilder(one=" + this.one) + ", two=") + this.two) + ", foo=") + this.foo) + ", bars=") + this.bars) + ")");
+ }
+ }
+ private String mOne;
+ private String mTwo;
+ private @Builder.ObtainVia(method = "rrr",isStatic = true) T foo;
+ private @lombok.Singular List<T> bars;
+ public static <K>K rrr(BuilderWithToBuilder<K> x) {
+ return x.foo;
+ }
+ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilder(final String one, final String two, final T foo, final List<T> bars) {
+ super();
+ this.mOne = one;
+ this.mTwo = two;
+ this.foo = foo;
+ this.bars = bars;
+ }
+ public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") <T>BuilderWithToBuilderBuilder<T> builder() {
+ return new BuilderWithToBuilderBuilder<T>();
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithToBuilderBuilder<T> toBuilder() {
+ return new BuilderWithToBuilderBuilder<T>().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.rrr(this)).bars(this.bars);
+ }
+}
+@lombok.experimental.Accessors(prefix = "m") class ConstructorWithToBuilder<T> {
+ public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class ConstructorWithToBuilderBuilder<T> {
+ private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String mOne;
+ private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") T bar;
+ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorWithToBuilderBuilder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorWithToBuilderBuilder<T> mOne(final String mOne) {
+ this.mOne = mOne;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorWithToBuilderBuilder<T> bar(final T bar) {
+ this.bar = bar;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorWithToBuilder<T> build() {
+ return new ConstructorWithToBuilder<T>(mOne, bar);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
+ return (((("ConstructorWithToBuilder.ConstructorWithToBuilderBuilder(mOne=" + this.mOne) + ", bar=") + this.bar) + ")");
+ }
+ }
+ private String mOne;
+ private String mTwo;
+ private T foo;
+ private @lombok.Singular List<T> bars;
+ public @Builder(toBuilder = true) ConstructorWithToBuilder(String mOne, @Builder.ObtainVia(field = "foo") T bar) {
+ super();
+ }
+ public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") <T>ConstructorWithToBuilderBuilder<T> builder() {
+ return new ConstructorWithToBuilderBuilder<T>();
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ConstructorWithToBuilderBuilder<T> toBuilder() {
+ return new ConstructorWithToBuilderBuilder<T>().mOne(this.mOne).bar(this.foo);
+ }
+}
+@lombok.experimental.Accessors(prefix = "m") class StaticWithToBuilder<T, K> {
+ public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class StaticWithToBuilderBuilder<Z> {
+ private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String mOne;
+ private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") Z bar;
+ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StaticWithToBuilderBuilder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StaticWithToBuilderBuilder<Z> mOne(final String mOne) {
+ this.mOne = mOne;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StaticWithToBuilderBuilder<Z> bar(final Z bar) {
+ this.bar = bar;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StaticWithToBuilder<Z, String> build() {
+ return StaticWithToBuilder.<Z>test(mOne, bar);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
+ return (((("StaticWithToBuilder.StaticWithToBuilderBuilder(mOne=" + this.mOne) + ", bar=") + this.bar) + ")");
+ }
+ }
+ private String mOne;
+ private String mTwo;
+ private T foo;
+ private K bar;
+ private @lombok.Singular List<T> bars;
+ StaticWithToBuilder() {
+ super();
+ }
+ public static @Builder(toBuilder = true) <Z>StaticWithToBuilder<Z, String> test(String mOne, @Builder.ObtainVia(field = "foo") Z bar) {
+ return new StaticWithToBuilder<Z, String>();
+ }
+ public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") <Z>StaticWithToBuilderBuilder<Z> builder() {
+ return new StaticWithToBuilderBuilder<Z>();
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StaticWithToBuilderBuilder<T> toBuilder() {
+ return new StaticWithToBuilderBuilder<T>().mOne(this.mOne).bar(this.foo);
+ }
+}
diff --git a/test/transform/resource/after-ecj/Constructors.java b/test/transform/resource/after-ecj/Constructors.java
index 998872a2..4cc24a81 100644
--- a/test/transform/resource/after-ecj/Constructors.java
+++ b/test/transform/resource/after-ecj/Constructors.java
@@ -77,4 +77,22 @@
super();
this.x = x;
}
+}
+@lombok.NoArgsConstructor(force = true) class NoArgsConstructor2 {
+ final int x;
+ final double y;
+ final char c;
+ final boolean b;
+ final float f;
+ final String s;
+ byte z;
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") NoArgsConstructor2() {
+ super();
+ this.x = 0;
+ this.y = 0D;
+ this.c = '\0';
+ this.b = false;
+ this.f = 0F;
+ this.s = null;
+ }
} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/DataOnLocalClass.java b/test/transform/resource/after-ecj/DataOnLocalClass.java
index 856160de..9d6bced1 100644
--- a/test/transform/resource/after-ecj/DataOnLocalClass.java
+++ b/test/transform/resource/after-ecj/DataOnLocalClass.java
@@ -40,7 +40,7 @@ class DataOnLocalClass1 {
int result = 1;
result = ((result * PRIME) + this.getX());
final java.lang.Object $name = this.getName();
- result = ((result * PRIME) + (($name == null) ? 0 : $name.hashCode()));
+ result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode()));
return result;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
@@ -89,7 +89,7 @@ class DataOnLocalClass2 {
final int PRIME = 59;
int result = 1;
final java.lang.Object $name = this.getName();
- result = ((result * PRIME) + (($name == null) ? 0 : $name.hashCode()));
+ result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode()));
return result;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
diff --git a/test/transform/resource/after-ecj/DataPlain.java b/test/transform/resource/after-ecj/DataPlain.java
index 8b243766..ba6c75c8 100644
--- a/test/transform/resource/after-ecj/DataPlain.java
+++ b/test/transform/resource/after-ecj/DataPlain.java
@@ -35,7 +35,7 @@ import lombok.Data;
int result = 1;
result = ((result * PRIME) + this.getX());
final java.lang.Object $name = this.getName();
- result = ((result * PRIME) + (($name == null) ? 0 : $name.hashCode()));
+ result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode()));
return result;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
@@ -82,7 +82,7 @@ import lombok.Data;
int result = 1;
result = ((result * PRIME) + this.getX());
final java.lang.Object $name = this.getName();
- result = ((result * PRIME) + (($name == null) ? 0 : $name.hashCode()));
+ result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode()));
return result;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
@@ -124,7 +124,7 @@ final @Data class Data3 {
int result = 1;
result = ((result * PRIME) + this.getX());
final java.lang.Object $name = this.getName();
- result = ((result * PRIME) + (($name == null) ? 0 : $name.hashCode()));
+ result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode()));
return result;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
diff --git a/test/transform/resource/after-ecj/DataWithGetter.java b/test/transform/resource/after-ecj/DataWithGetter.java
index b37aa137..5a358c89 100644
--- a/test/transform/resource/after-ecj/DataWithGetter.java
+++ b/test/transform/resource/after-ecj/DataWithGetter.java
@@ -35,7 +35,7 @@
result = ((result * PRIME) + this.getX());
result = ((result * PRIME) + this.getY());
final java.lang.Object $z = this.getZ();
- result = ((result * PRIME) + (($z == null) ? 0 : $z.hashCode()));
+ result = ((result * PRIME) + (($z == null) ? 43 : $z.hashCode()));
return result;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
diff --git a/test/transform/resource/after-ecj/DataWithGetterNone.java b/test/transform/resource/after-ecj/DataWithGetterNone.java
index 66a26277..b03ce146 100644
--- a/test/transform/resource/after-ecj/DataWithGetterNone.java
+++ b/test/transform/resource/after-ecj/DataWithGetterNone.java
@@ -35,7 +35,7 @@
result = ((result * PRIME) + this.x);
result = ((result * PRIME) + this.y);
final java.lang.Object $z = this.z;
- result = ((result * PRIME) + (($z == null) ? 0 : $z.hashCode()));
+ result = ((result * PRIME) + (($z == null) ? 43 : $z.hashCode()));
return result;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
diff --git a/test/transform/resource/after-ecj/EqualsAndHashCode.java b/test/transform/resource/after-ecj/EqualsAndHashCode.java
index 7db65c82..c0bb5bbb 100644
--- a/test/transform/resource/after-ecj/EqualsAndHashCode.java
+++ b/test/transform/resource/after-ecj/EqualsAndHashCode.java
@@ -41,9 +41,9 @@
result = ((result * PRIME) + java.util.Arrays.hashCode(this.y));
result = ((result * PRIME) + java.util.Arrays.deepHashCode(this.z));
final java.lang.Object $a = this.a;
- result = ((result * PRIME) + (($a == null) ? 0 : $a.hashCode()));
+ result = ((result * PRIME) + (($a == null) ? 43 : $a.hashCode()));
final java.lang.Object $b = this.b;
- result = ((result * PRIME) + (($b == null) ? 0 : $b.hashCode()));
+ result = ((result * PRIME) + (($b == null) ? 43 : $b.hashCode()));
return result;
}
}
diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeWithOnParam.java b/test/transform/resource/after-ecj/EqualsAndHashCodeWithOnParam.java
index 77bba8e0..a59d2835 100644
--- a/test/transform/resource/after-ecj/EqualsAndHashCodeWithOnParam.java
+++ b/test/transform/resource/after-ecj/EqualsAndHashCodeWithOnParam.java
@@ -44,9 +44,9 @@
result = ((result * PRIME) + java.util.Arrays.hashCode(this.y));
result = ((result * PRIME) + java.util.Arrays.deepHashCode(this.z));
final java.lang.Object $a = this.a;
- result = ((result * PRIME) + (($a == null) ? 0 : $a.hashCode()));
+ result = ((result * PRIME) + (($a == null) ? 43 : $a.hashCode()));
final java.lang.Object $b = this.b;
- result = ((result * PRIME) + (($b == null) ? 0 : $b.hashCode()));
+ result = ((result * PRIME) + (($b == null) ? 43 : $b.hashCode()));
return result;
}
} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/EqualsAndHashcodeOfExclude.java b/test/transform/resource/after-ecj/EqualsAndHashcodeOfExclude.java
new file mode 100644
index 00000000..283c5430
--- /dev/null
+++ b/test/transform/resource/after-ecj/EqualsAndHashcodeOfExclude.java
@@ -0,0 +1,46 @@
+final @lombok.EqualsAndHashCode(of = {"x"}) class EqualsAndHashCodeOf {
+ int x;
+ int y;
+ EqualsAndHashCodeOf() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) {
+ if ((o == this))
+ return true;
+ if ((! (o instanceof EqualsAndHashCodeOf)))
+ return false;
+ final EqualsAndHashCodeOf other = (EqualsAndHashCodeOf) o;
+ if ((this.x != other.x))
+ return false;
+ return true;
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ result = ((result * PRIME) + this.x);
+ return result;
+ }
+}
+final @lombok.EqualsAndHashCode(exclude = {"y"}) class EqualsAndHashCodeExclude {
+ int x;
+ int y;
+ EqualsAndHashCodeExclude() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) {
+ if ((o == this))
+ return true;
+ if ((! (o instanceof EqualsAndHashCodeExclude)))
+ return false;
+ final EqualsAndHashCodeExclude other = (EqualsAndHashCodeExclude) o;
+ if ((this.x != other.x))
+ return false;
+ return true;
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ result = ((result * PRIME) + this.x);
+ return result;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/FieldDefaultsViaConfig.java b/test/transform/resource/after-ecj/FieldDefaultsViaConfig.java
new file mode 100644
index 00000000..689d2601
--- /dev/null
+++ b/test/transform/resource/after-ecj/FieldDefaultsViaConfig.java
@@ -0,0 +1,15 @@
+class FieldDefaultsViaConfig1 {
+ private final int x;
+ private @lombok.experimental.NonFinal int y;
+ FieldDefaultsViaConfig1(int x) {
+ super();
+ this.x = x;
+ }
+}
+@lombok.experimental.FieldDefaults(level = lombok.AccessLevel.PROTECTED) class FieldDefaultsViaConfig2 {
+ final @lombok.experimental.PackagePrivate int x = 2;
+ protected final int y = 0;
+ FieldDefaultsViaConfig2() {
+ super();
+ }
+}
diff --git a/test/transform/resource/after-ecj/FieldDefaultsViaConfigAndRequiredArgsConstructor.java b/test/transform/resource/after-ecj/FieldDefaultsViaConfigAndRequiredArgsConstructor.java
new file mode 100644
index 00000000..6a727f1d
--- /dev/null
+++ b/test/transform/resource/after-ecj/FieldDefaultsViaConfigAndRequiredArgsConstructor.java
@@ -0,0 +1,7 @@
+@lombok.RequiredArgsConstructor class FieldDefaultsViaConfigAndRequiredArgsConstructor {
+ final int x;
+ public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") FieldDefaultsViaConfigAndRequiredArgsConstructor(final int x) {
+ super();
+ this.x = x;
+ }
+}
diff --git a/test/transform/resource/after-ecj/GetterLazyEahcToString.java b/test/transform/resource/after-ecj/GetterLazyEahcToString.java
index f0cb2ec2..40716f8b 100644
--- a/test/transform/resource/after-ecj/GetterLazyEahcToString.java
+++ b/test/transform/resource/after-ecj/GetterLazyEahcToString.java
@@ -49,9 +49,9 @@
final int PRIME = 59;
int result = 1;
final java.lang.Object $value = this.getValue();
- result = ((result * PRIME) + (($value == null) ? 0 : $value.hashCode()));
+ result = ((result * PRIME) + (($value == null) ? 43 : $value.hashCode()));
final java.lang.Object $value2 = this.value2;
- result = ((result * PRIME) + (($value2 == null) ? 0 : $value2.hashCode()));
+ result = ((result * PRIME) + (($value2 == null) ? 43 : $value2.hashCode()));
return result;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
diff --git a/test/transform/resource/after-ecj/GetterSetterJavadoc.java b/test/transform/resource/after-ecj/GetterSetterJavadoc.java
index 21841d47..275b408d 100644
--- a/test/transform/resource/after-ecj/GetterSetterJavadoc.java
+++ b/test/transform/resource/after-ecj/GetterSetterJavadoc.java
@@ -57,4 +57,30 @@ class GetterSetterJavadoc3 {
public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") void setFieldName(final int fieldName) {
this.fieldName = fieldName;
}
+}
+@lombok.experimental.Accessors(chain = true,fluent = true) class GetterSetterJavadoc4 {
+ private @lombok.Getter @lombok.Setter int fieldName;
+ GetterSetterJavadoc4() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int fieldName() {
+ return this.fieldName;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") GetterSetterJavadoc4 fieldName(final int fieldName) {
+ this.fieldName = fieldName;
+ return this;
+ }
+}
+@lombok.experimental.Accessors(chain = true,fluent = true) class GetterSetterJavadoc5 {
+ private @lombok.Getter @lombok.Setter int fieldName;
+ GetterSetterJavadoc5() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int fieldName() {
+ return this.fieldName;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") GetterSetterJavadoc5 fieldName(final int fieldName) {
+ this.fieldName = fieldName;
+ return this;
+ }
} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/Helper.java b/test/transform/resource/after-ecj/Helper.java
new file mode 100644
index 00000000..1b4e8bd2
--- /dev/null
+++ b/test/transform/resource/after-ecj/Helper.java
@@ -0,0 +1,26 @@
+import lombok.experimental.Helper;
+class HelperTest {
+ HelperTest() {
+ super();
+ }
+ void test() {
+ @Helper class H1 {
+ H1() {
+ super();
+ }
+ void foo() {
+ System.out.println("Hello");
+ }
+ }
+ final H1 $H1 = new H1();
+ $H1.foo();
+ @Helper class H2 {
+ H2() {
+ super();
+ }
+ void bar() {
+ $H1.foo();
+ }
+ }
+ }
+}
diff --git a/test/transform/resource/after-ecj/NonNullOnParameterOfDefaultMethod.java b/test/transform/resource/after-ecj/NonNullOnParameterOfDefaultMethod.java
new file mode 100644
index 00000000..85e99702
--- /dev/null
+++ b/test/transform/resource/after-ecj/NonNullOnParameterOfDefaultMethod.java
@@ -0,0 +1,10 @@
+interface NonNullOnParameterOfDefaultMethod {
+ void test(@lombok.NonNull String arg);
+ default void test2(@lombok.NonNull String arg) {
+ if ((arg == null))
+ {
+ throw new java.lang.NullPointerException("arg");
+ }
+ System.out.println(arg);
+ }
+}
diff --git a/test/transform/resource/after-ecj/UtilityClass.java b/test/transform/resource/after-ecj/UtilityClass.java
index e8db6a21..81d5d9e6 100644
--- a/test/transform/resource/after-ecj/UtilityClass.java
+++ b/test/transform/resource/after-ecj/UtilityClass.java
@@ -5,7 +5,9 @@ final @lombok.experimental.UtilityClass class UtilityClass {
super();
}
}
- private static String someField;
+ private static long someField = System.currentTimeMillis();
+ <clinit>() {
+ }
static void someMethod() {
System.out.println();
}
@@ -18,6 +20,8 @@ class UtilityInner {
static class InnerInner {
static final @lombok.experimental.UtilityClass class InnerInnerInner {
static int member;
+ <clinit>() {
+ }
private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") InnerInnerInner() {
super();
throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated");
@@ -30,6 +34,8 @@ class UtilityInner {
enum UtilityInsideEnum {
static final @lombok.experimental.UtilityClass class InsideEnum {
static int member;
+ <clinit>() {
+ }
private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") InsideEnum() {
super();
throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated");
@@ -46,6 +52,8 @@ class UtilityInner {
interface UtilityInsideInterface {
final @lombok.experimental.UtilityClass class InsideInterface {
static int member;
+ <clinit>() {
+ }
private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") InsideInterface() {
super();
throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated");
diff --git a/test/transform/resource/after-ecj/UtilityClassErrors.java b/test/transform/resource/after-ecj/UtilityClassErrors.java
index 26b331a1..b5a51313 100644
--- a/test/transform/resource/after-ecj/UtilityClassErrors.java
+++ b/test/transform/resource/after-ecj/UtilityClassErrors.java
@@ -1,5 +1,7 @@
final @lombok.experimental.UtilityClass class UtilityClassErrors1 {
private static String someField;
+ <clinit>() {
+ }
protected UtilityClassErrors1() {
super();
}
diff --git a/test/transform/resource/after-ecj/ValuePlain.java b/test/transform/resource/after-ecj/ValuePlain.java
index 1fd05da8..6a3265c9 100644
--- a/test/transform/resource/after-ecj/ValuePlain.java
+++ b/test/transform/resource/after-ecj/ValuePlain.java
@@ -27,7 +27,7 @@ final @lombok.Value class Value1 {
int result = 1;
result = ((result * PRIME) + this.getX());
final java.lang.Object $name = this.getName();
- result = ((result * PRIME) + (($name == null) ? 0 : $name.hashCode()));
+ result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode()));
return result;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
@@ -72,7 +72,7 @@ final @lombok.Value class Value1 {
int result = 1;
result = ((result * PRIME) + this.getX());
final java.lang.Object $name = this.getName();
- result = ((result * PRIME) + (($name == null) ? 0 : $name.hashCode()));
+ result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode()));
return result;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
diff --git a/test/transform/resource/after-ecj/ValueStaticField.java b/test/transform/resource/after-ecj/ValueStaticField.java
new file mode 100644
index 00000000..4ce84a02
--- /dev/null
+++ b/test/transform/resource/after-ecj/ValueStaticField.java
@@ -0,0 +1,24 @@
+import lombok.Value;
+final @Value class ValueStaticField {
+ private static int x;
+ private static final String PASSWORD = "Ken sent me";
+ <clinit>() {
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") boolean equals(final java.lang.Object o) {
+ if ((o == this))
+ return true;
+ if ((! (o instanceof ValueStaticField)))
+ return false;
+ return true;
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int hashCode() {
+ int result = 1;
+ return result;
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
+ return "ValueStaticField()";
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") ValueStaticField() {
+ super();
+ }
+} \ No newline at end of file