aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2015-11-16 23:53:34 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2015-11-16 23:53:34 +0100
commit8508e789f9dbae84f9f5da9efb10d5fbfcca51d4 (patch)
treea3e1be6c13f9b394b71eccf45a0c18b4b46fc3aa /test/transform/resource
parentb8a222006da0a535134c5e7e94282550bfe745b6 (diff)
parent14af3bec3b601d52c6a34710a63e22fceebf8dde (diff)
downloadlombok-8508e789f9dbae84f9f5da9efb10d5fbfcca51d4.tar.gz
lombok-8508e789f9dbae84f9f5da9efb10d5fbfcca51d4.tar.bz2
lombok-8508e789f9dbae84f9f5da9efb10d5fbfcca51d4.zip
Merge branch 'pr-builder-on-instance-methods' of https://github.com/enriquedacostacambio/lombok into enriquedacostacambio-pr-builder-on-instance-methods
Conflicts: AUTHORS src/core/lombok/Builder.java src/core/lombok/eclipse/handlers/HandleBuilder.java src/core/lombok/javac/handlers/HandleBuilder.java
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-delombok/BuilderInstanceMethod.java66
-rw-r--r--test/transform/resource/after-ecj/BuilderInstanceMethod.java43
-rw-r--r--test/transform/resource/before/BuilderInstanceMethod.java8
3 files changed, 117 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/BuilderInstanceMethod.java b/test/transform/resource/after-delombok/BuilderInstanceMethod.java
new file mode 100644
index 00000000..61e237d0
--- /dev/null
+++ b/test/transform/resource/after-delombok/BuilderInstanceMethod.java
@@ -0,0 +1,66 @@
+import java.util.List;
+class BuilderInstanceMethod<T> {
+ public String create(int show, final int yes, List<T> also, int $andMe) {
+ return "" + show + yes + also + $andMe;
+ }
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public class StringBuilder {
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ private int show;
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ private int yes;
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ private List<T> also;
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ private int $andMe;
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ StringBuilder() {
+ }
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public StringBuilder show(final int show) {
+ this.show = show;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public StringBuilder yes(final int yes) {
+ this.yes = yes;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public StringBuilder also(final List<T> also) {
+ this.also = also;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public StringBuilder $andMe(final int $andMe) {
+ this.$andMe = $andMe;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public String build() {
+ return BuilderInstanceMethod.this.create(show, yes, also, $andMe);
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public java.lang.String toString() {
+ return "BuilderInstanceMethod.StringBuilder(show=" + this.show + ", yes=" + this.yes + ", also=" + this.also + ", $andMe=" + this.$andMe + ")";
+ }
+ }
+ @java.lang.SuppressWarnings("all")
+ @javax.annotation.Generated("lombok")
+ public StringBuilder builder() {
+ return new StringBuilder();
+ }
+}
diff --git a/test/transform/resource/after-ecj/BuilderInstanceMethod.java b/test/transform/resource/after-ecj/BuilderInstanceMethod.java
new file mode 100644
index 00000000..ff7d0aab
--- /dev/null
+++ b/test/transform/resource/after-ecj/BuilderInstanceMethod.java
@@ -0,0 +1,43 @@
+import java.util.List;
+class BuilderInstanceMethod<T> {
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") class StringBuilder {
+ private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int show;
+ private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int yes;
+ private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") List<T> also;
+ private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int $andMe;
+ @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StringBuilder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StringBuilder show(final int show) {
+ this.show = show;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StringBuilder yes(final int yes) {
+ this.yes = yes;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StringBuilder also(final List<T> also) {
+ this.also = also;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StringBuilder $andMe(final int $andMe) {
+ this.$andMe = $andMe;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") String build() {
+ return BuilderInstanceMethod.this.create(show, yes, also, $andMe);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
+ return (((((((("BuilderInstanceMethod.StringBuilder(show=" + this.show) + ", yes=") + this.yes) + ", also=") + this.also) + ", $andMe=") + this.$andMe) + ")");
+ }
+ }
+ BuilderInstanceMethod() {
+ super();
+ }
+ public @lombok.Builder String create(int show, final int yes, List<T> also, int $andMe) {
+ return (((("" + show) + yes) + also) + $andMe);
+ }
+ public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") StringBuilder builder() {
+ return new StringBuilder();
+ }
+}
diff --git a/test/transform/resource/before/BuilderInstanceMethod.java b/test/transform/resource/before/BuilderInstanceMethod.java
new file mode 100644
index 00000000..666664a2
--- /dev/null
+++ b/test/transform/resource/before/BuilderInstanceMethod.java
@@ -0,0 +1,8 @@
+import java.util.List;
+
+class BuilderInstanceMethod<T> {
+ @lombok.Builder
+ public String create(int show, final int yes, List<T> also, int $andMe) {
+ return "" + show + yes + also + $andMe;
+ }
+}