aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCaleb Brinkman <cbrinkman@sonatype.com>2019-07-10 15:05:06 -0500
committerCaleb Brinkman <cbrinkman@sonatype.com>2019-07-10 15:05:06 -0500
commit96151ade650c2038ab639a1c0f5a504747c4b1b5 (patch)
treed826f1c2e189ca49ee1d534ed5012943f79b242c /test
parent5f198d71c684c6a2f1eec9ae6026cca5f4fd7c30 (diff)
downloadlombok-96151ade650c2038ab639a1c0f5a504747c4b1b5.tar.gz
lombok-96151ade650c2038ab639a1c0f5a504747c4b1b5.tar.bz2
lombok-96151ade650c2038ab639a1c0f5a504747c4b1b5.zip
Add tests for prefixed builder
Diffstat (limited to 'test')
-rw-r--r--test/transform/resource/after-delombok/BuilderWithPrefix.java34
-rw-r--r--test/transform/resource/after-ecj/BuilderWithPrefix.java27
-rw-r--r--test/transform/resource/before/BuilderWithPrefix.java6
3 files changed, 67 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/BuilderWithPrefix.java b/test/transform/resource/after-delombok/BuilderWithPrefix.java
new file mode 100644
index 00000000..c29d2a16
--- /dev/null
+++ b/test/transform/resource/after-delombok/BuilderWithPrefix.java
@@ -0,0 +1,34 @@
+import java.util.List;
+class BuilderWithPrefix<T> {
+ private int unprefixed;
+ @java.lang.SuppressWarnings("all")
+ BuilderWithPrefix(final int unprefixed) {
+ this.unprefixed = unprefixed;
+ }
+ @java.lang.SuppressWarnings("all")
+ protected static class BuilderWithPrefixBuilder<T> {
+ @java.lang.SuppressWarnings("all")
+ private int unprefixed;
+ @java.lang.SuppressWarnings("all")
+ BuilderWithPrefixBuilder() {
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithPrefixBuilder<T> withUnprefixed(final int unprefixed) {
+ this.unprefixed = unprefixed;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithPrefix<T> build() {
+ return new BuilderWithPrefix<T>(unprefixed);
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "BuilderWithPrefix.BuilderWithPrefixBuilder(unprefixed=" + this.unprefixed + ")";
+ }
+ }
+ @java.lang.SuppressWarnings("all")
+ protected static <T> BuilderWithPrefixBuilder<T> builder() {
+ return new BuilderWithPrefixBuilder<T>();
+ }
+}
diff --git a/test/transform/resource/after-ecj/BuilderWithPrefix.java b/test/transform/resource/after-ecj/BuilderWithPrefix.java
new file mode 100644
index 00000000..21a60d0d
--- /dev/null
+++ b/test/transform/resource/after-ecj/BuilderWithPrefix.java
@@ -0,0 +1,27 @@
+import java.util.List;
+@lombok.Builder(access = lombok.AccessLevel.PROTECTED,setterPrefix = "with") class BuilderWithPrefix<T> {
+ protected static @java.lang.SuppressWarnings("all") class BuilderWithPrefixBuilder<T> {
+ private @java.lang.SuppressWarnings("all") int unprefixed;
+ @java.lang.SuppressWarnings("all") BuilderWithPrefixBuilder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithPrefixBuilder<T> withUnprefixed(final int unprefixed) {
+ this.unprefixed = unprefixed;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithPrefix<T> build() {
+ return new BuilderWithPrefix<T>(unprefixed);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (((("BuilderWithPrefix.BuilderWithPrefixBuilder(unprefixed=" + this.unprefixed) + ")");
+ }
+ }
+ private int unprefixed;
+ @java.lang.SuppressWarnings("all") BuilderWithPrefix(final int unprefixed) {
+ super();
+ this.unprefixed = unprefixed;
+ }
+ protected static @java.lang.SuppressWarnings("all") <T>BuilderWithPrefixBuilder<T> builder() {
+ return new BuilderWithPrefixBuilder<T>();
+ }
+}
diff --git a/test/transform/resource/before/BuilderWithPrefix.java b/test/transform/resource/before/BuilderWithPrefix.java
new file mode 100644
index 00000000..38f3c029
--- /dev/null
+++ b/test/transform/resource/before/BuilderWithPrefix.java
@@ -0,0 +1,6 @@
+import java.util.List;
+
+@lombok.Builder(access = lombok.AccessLevel.PROTECTED, setterPrefix = "with")
+class BuilderWithPrefix<T> {
+ private int unprefixed;
+}