aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-delombok/BuilderWithToBuilder.java3
-rw-r--r--test/transform/resource/after-delombok/I2335_BuilderMultipleObtainVia.java59
-rw-r--r--test/transform/resource/after-ecj/BuilderWithToBuilder.java3
-rw-r--r--test/transform/resource/after-ecj/I2335_BuilderMultipleObtainVia.java51
-rw-r--r--test/transform/resource/before/I2335_BuilderMultipleObtainVia.java32
5 files changed, 146 insertions, 2 deletions
diff --git a/test/transform/resource/after-delombok/BuilderWithToBuilder.java b/test/transform/resource/after-delombok/BuilderWithToBuilder.java
index 2c4b0531..aa47c430 100644
--- a/test/transform/resource/after-delombok/BuilderWithToBuilder.java
+++ b/test/transform/resource/after-delombok/BuilderWithToBuilder.java
@@ -86,7 +86,8 @@ class BuilderWithToBuilder<T> {
}
@java.lang.SuppressWarnings("all")
public BuilderWithToBuilder.BuilderWithToBuilderBuilder<T> toBuilder() {
- final BuilderWithToBuilder.BuilderWithToBuilderBuilder<T> builder = new BuilderWithToBuilder.BuilderWithToBuilderBuilder<T>().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.<T>rrr(this));
+ final T foo = BuilderWithToBuilder.<T>rrr(this);
+ final BuilderWithToBuilder.BuilderWithToBuilderBuilder<T> builder = new BuilderWithToBuilder.BuilderWithToBuilderBuilder<T>().one(this.mOne).two(this.mTwo).foo(foo);
if (this.bars != null) builder.bars(this.bars);
return builder;
}
diff --git a/test/transform/resource/after-delombok/I2335_BuilderMultipleObtainVia.java b/test/transform/resource/after-delombok/I2335_BuilderMultipleObtainVia.java
new file mode 100644
index 00000000..f9cd424d
--- /dev/null
+++ b/test/transform/resource/after-delombok/I2335_BuilderMultipleObtainVia.java
@@ -0,0 +1,59 @@
+public class I2335_BuilderMultipleObtainVia {
+ private String theString;
+ private Long theLong;
+ public I2335_BuilderMultipleObtainVia(String theString, Long theLong) {
+ setTheString(theString);
+ setTheLong(theLong);
+ }
+ public String getTheString() {
+ return theString;
+ }
+ public Long getTheLong() {
+ return theLong;
+ }
+ public void setTheString(String theString) {
+ this.theString = theString;
+ }
+ public void setTheLong(Long theLong) {
+ this.theLong = theLong;
+ }
+ @java.lang.SuppressWarnings("all")
+ public static class I2335_BuilderMultipleObtainViaBuilder {
+ @java.lang.SuppressWarnings("all")
+ private String theString;
+ @java.lang.SuppressWarnings("all")
+ private Long theLong;
+ @java.lang.SuppressWarnings("all")
+ I2335_BuilderMultipleObtainViaBuilder() {
+ }
+ @java.lang.SuppressWarnings("all")
+ public I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder theString(final String theString) {
+ this.theString = theString;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder theLong(final Long theLong) {
+ this.theLong = theLong;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public I2335_BuilderMultipleObtainVia build() {
+ return new I2335_BuilderMultipleObtainVia(this.theString, this.theLong);
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder(theString=" + this.theString + ", theLong=" + this.theLong + ")";
+ }
+ }
+ @java.lang.SuppressWarnings("all")
+ public static I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder builder() {
+ return new I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder();
+ }
+ @java.lang.SuppressWarnings("all")
+ public I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder toBuilder() {
+ final String theString = this.getTheString();
+ final Long theLong = this.getTheLong();
+ return new I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder().theString(theString).theLong(theLong);
+ }
+}
diff --git a/test/transform/resource/after-ecj/BuilderWithToBuilder.java b/test/transform/resource/after-ecj/BuilderWithToBuilder.java
index 131b0ca0..6d935736 100644
--- a/test/transform/resource/after-ecj/BuilderWithToBuilder.java
+++ b/test/transform/resource/after-ecj/BuilderWithToBuilder.java
@@ -74,7 +74,8 @@ import lombok.Builder;
return new BuilderWithToBuilder.BuilderWithToBuilderBuilder<T>();
}
public @java.lang.SuppressWarnings("all") BuilderWithToBuilder.BuilderWithToBuilderBuilder<T> toBuilder() {
- final BuilderWithToBuilder.BuilderWithToBuilderBuilder<T> builder = new BuilderWithToBuilder.BuilderWithToBuilderBuilder<T>().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.<T>rrr(this));
+ final T foo = BuilderWithToBuilder.<T>rrr(this);
+ final BuilderWithToBuilder.BuilderWithToBuilderBuilder<T> builder = new BuilderWithToBuilder.BuilderWithToBuilderBuilder<T>().one(this.mOne).two(this.mTwo).foo(foo);
if ((this.bars != null))
builder.bars(this.bars);
return builder;
diff --git a/test/transform/resource/after-ecj/I2335_BuilderMultipleObtainVia.java b/test/transform/resource/after-ecj/I2335_BuilderMultipleObtainVia.java
new file mode 100644
index 00000000..7d8b8953
--- /dev/null
+++ b/test/transform/resource/after-ecj/I2335_BuilderMultipleObtainVia.java
@@ -0,0 +1,51 @@
+import lombok.Builder;
+public @Builder class I2335_BuilderMultipleObtainVia {
+ public static @java.lang.SuppressWarnings("all") class I2335_BuilderMultipleObtainViaBuilder {
+ private @java.lang.SuppressWarnings("all") String theString;
+ private @java.lang.SuppressWarnings("all") Long theLong;
+ @java.lang.SuppressWarnings("all") I2335_BuilderMultipleObtainViaBuilder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder theString(final String theString) {
+ this.theString = theString;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder theLong(final Long theLong) {
+ this.theLong = theLong;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") I2335_BuilderMultipleObtainVia build() {
+ return new I2335_BuilderMultipleObtainVia(this.theString, this.theLong);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (((("I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder(theString=" + this.theString) + ", theLong=") + this.theLong) + ")");
+ }
+ }
+ private String theString;
+ private Long theLong;
+ public @Builder(toBuilder = true) I2335_BuilderMultipleObtainVia(@Builder.ObtainVia(method = "getTheString") String theString, @Builder.ObtainVia(method = "getTheLong") Long theLong) {
+ super();
+ setTheString(theString);
+ setTheLong(theLong);
+ }
+ public String getTheString() {
+ return theString;
+ }
+ public Long getTheLong() {
+ return theLong;
+ }
+ public void setTheString(String theString) {
+ this.theString = theString;
+ }
+ public void setTheLong(Long theLong) {
+ this.theLong = theLong;
+ }
+ public static @java.lang.SuppressWarnings("all") I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder builder() {
+ return new I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder();
+ }
+ public @java.lang.SuppressWarnings("all") I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder toBuilder() {
+ String theString = this.getTheString();
+ Long theLong = this.getTheLong();
+ return new I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder().theString(theString).theLong(theLong);
+ }
+}
diff --git a/test/transform/resource/before/I2335_BuilderMultipleObtainVia.java b/test/transform/resource/before/I2335_BuilderMultipleObtainVia.java
new file mode 100644
index 00000000..ef3723c0
--- /dev/null
+++ b/test/transform/resource/before/I2335_BuilderMultipleObtainVia.java
@@ -0,0 +1,32 @@
+import lombok.Builder;
+
+@Builder
+public class I2335_BuilderMultipleObtainVia {
+ private String theString;
+ private Long theLong;
+
+ @Builder(toBuilder = true)
+ public I2335_BuilderMultipleObtainVia(
+ @Builder.ObtainVia(method = "getTheString") String theString,
+ @Builder.ObtainVia(method = "getTheLong") Long theLong
+ ) {
+ setTheString(theString);
+ setTheLong(theLong);
+ }
+
+ public String getTheString() {
+ return theString;
+ }
+
+ public Long getTheLong() {
+ return theLong;
+ }
+
+ public void setTheString(String theString) {
+ this.theString = theString;
+ }
+
+ public void setTheLong(Long theLong) {
+ this.theLong = theLong;
+ }
+}