aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2021-10-18 15:44:45 +0200
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2021-10-18 20:24:37 +0200
commitdbc67c5c2d0388692f9c9dec02b294da14fd5b56 (patch)
treeb3e95fc757976fb3c9188c6c046191eaaea7496e /test/transform/resource
parent1ae87bad9583620ca79c1f3ede31703cbb95cbc5 (diff)
downloadlombok-dbc67c5c2d0388692f9c9dec02b294da14fd5b56.tar.gz
lombok-dbc67c5c2d0388692f9c9dec02b294da14fd5b56.tar.bz2
lombok-dbc67c5c2d0388692f9c9dec02b294da14fd5b56.zip
[#2693] Review and updates for javabeans-style capitalization lombok.config
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-delombok/BuilderWithJavaBeansSpecCapitalization.java106
-rw-r--r--test/transform/resource/after-delombok/GetterWithJavaBeansSpecCapitalization.java18
-rw-r--r--test/transform/resource/after-delombok/SetterWithJavaBeansSpecCapitalization.java15
-rw-r--r--test/transform/resource/after-delombok/ValueWithJavaBeansSpecCapitalization.java11
-rw-r--r--test/transform/resource/after-delombok/WithOnJavaBeansSpecCapitalization.java29
-rw-r--r--test/transform/resource/after-delombok/WithWithJavaBeansSpecCapitalization.java12
-rw-r--r--test/transform/resource/after-ecj/BuilderWithJavaBeansSpecCapitalization.java99
-rw-r--r--test/transform/resource/after-ecj/GetterWithJavaBeansSpecCapitalization.java24
-rw-r--r--test/transform/resource/after-ecj/SetterWithJavaBeansSpecCapitalization.java24
-rw-r--r--test/transform/resource/after-ecj/ValueWithJavaBeansSpecCapitalization.java31
-rw-r--r--test/transform/resource/after-ecj/WithOnJavaBeansSpecCapitalization.java25
-rw-r--r--test/transform/resource/after-ecj/WithWithJavaBeansSpecCapitalization.java12
-rw-r--r--test/transform/resource/before/BuilderWithJavaBeansSpecCapitalization.java7
-rw-r--r--test/transform/resource/before/GetterWithJavaBeansSpecCapitalization.java8
-rw-r--r--test/transform/resource/before/SetterWithJavaBeansSpecCapitalization.java8
-rw-r--r--test/transform/resource/before/ValueWithJavaBeansSpecCapitalization.java7
-rw-r--r--test/transform/resource/before/WithOnJavaBeansSpecCapitalization.java16
-rw-r--r--test/transform/resource/before/WithWithJavaBeansSpecCapitalization.java8
18 files changed, 253 insertions, 207 deletions
diff --git a/test/transform/resource/after-delombok/BuilderWithJavaBeansSpecCapitalization.java b/test/transform/resource/after-delombok/BuilderWithJavaBeansSpecCapitalization.java
new file mode 100644
index 00000000..4a21f2c3
--- /dev/null
+++ b/test/transform/resource/after-delombok/BuilderWithJavaBeansSpecCapitalization.java
@@ -0,0 +1,106 @@
+class BuilderWithJavaBeansSpecCapitalization {
+ java.util.List<String> a;
+ java.util.List<String> aField;
+ String bField;
+ @java.lang.SuppressWarnings("all")
+ BuilderWithJavaBeansSpecCapitalization(final java.util.List<String> a, final java.util.List<String> aField, final String bField) {
+ this.a = a;
+ this.aField = aField;
+ this.bField = bField;
+ }
+ @java.lang.SuppressWarnings("all")
+ public static class BuilderWithJavaBeansSpecCapitalizationBuilder {
+ @java.lang.SuppressWarnings("all")
+ private java.util.ArrayList<String> a;
+ @java.lang.SuppressWarnings("all")
+ private java.util.ArrayList<String> aField;
+ @java.lang.SuppressWarnings("all")
+ private String bField;
+ @java.lang.SuppressWarnings("all")
+ BuilderWithJavaBeansSpecCapitalizationBuilder() {
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder setZ(final String z) {
+ if (this.a == null) this.a = new java.util.ArrayList<String>();
+ this.a.add(z);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder setA(final java.util.Collection<? extends String> a) {
+ if (a == null) {
+ throw new java.lang.NullPointerException("a cannot be null");
+ }
+ if (this.a == null) this.a = new java.util.ArrayList<String>();
+ this.a.addAll(a);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder clearA() {
+ if (this.a != null) this.a.clear();
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder setyField(final String yField) {
+ if (this.aField == null) this.aField = new java.util.ArrayList<String>();
+ this.aField.add(yField);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder setaField(final java.util.Collection<? extends String> aField) {
+ if (aField == null) {
+ throw new java.lang.NullPointerException("aField cannot be null");
+ }
+ if (this.aField == null) this.aField = new java.util.ArrayList<String>();
+ this.aField.addAll(aField);
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder clearaField() {
+ if (this.aField != null) this.aField.clear();
+ return this;
+ }
+ /**
+ * @return {@code this}.
+ */
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder setbField(final String bField) {
+ this.bField = bField;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithJavaBeansSpecCapitalization build() {
+ java.util.List<String> a;
+ switch (this.a == null ? 0 : this.a.size()) {
+ case 0:
+ a = java.util.Collections.emptyList();
+ break;
+ case 1:
+ a = java.util.Collections.singletonList(this.a.get(0));
+ break;
+ default:
+ a = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.a));
+ }
+ java.util.List<String> aField;
+ switch (this.aField == null ? 0 : this.aField.size()) {
+ case 0:
+ aField = java.util.Collections.emptyList();
+ break;
+ case 1:
+ aField = java.util.Collections.singletonList(this.aField.get(0));
+ break;
+ default:
+ aField = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.aField));
+ }
+ return new BuilderWithJavaBeansSpecCapitalization(a, aField, this.bField);
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder(a=" + this.a + ", aField=" + this.aField + ", bField=" + this.bField + ")";
+ }
+ }
+ @java.lang.SuppressWarnings("all")
+ public static BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder builder() {
+ return new BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/GetterWithJavaBeansSpecCapitalization.java b/test/transform/resource/after-delombok/GetterWithJavaBeansSpecCapitalization.java
index 06026c1b..51ccfe63 100644
--- a/test/transform/resource/after-delombok/GetterWithJavaBeansSpecCapitalization.java
+++ b/test/transform/resource/after-delombok/GetterWithJavaBeansSpecCapitalization.java
@@ -1,17 +1,3 @@
-class GetterWithoutJavaBeansSpecCapitalization {
- int a;
- int aField;
- @java.lang.SuppressWarnings("all")
- public int getA() {
- return this.a;
- }
- @java.lang.SuppressWarnings("all")
- public int getAField() {
- return this.aField;
- }
-}
-
-
class GetterWithJavaBeansSpecCapitalization {
int a;
int aField;
@@ -23,6 +9,4 @@ class GetterWithJavaBeansSpecCapitalization {
public int getaField() {
return this.aField;
}
-}
-
-
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/SetterWithJavaBeansSpecCapitalization.java b/test/transform/resource/after-delombok/SetterWithJavaBeansSpecCapitalization.java
index 24c8e883..de68ee60 100644
--- a/test/transform/resource/after-delombok/SetterWithJavaBeansSpecCapitalization.java
+++ b/test/transform/resource/after-delombok/SetterWithJavaBeansSpecCapitalization.java
@@ -1,16 +1,3 @@
-class SetterWithoutJavaBeansSpecCapitalization {
- int a;
- int aField;
- @java.lang.SuppressWarnings("all")
- public void setA(final int a) {
- this.a = a;
- }
- @java.lang.SuppressWarnings("all")
- public void setAField(final int aField) {
- this.aField = aField;
- }
-}
-
class SetterWithJavaBeansSpecCapitalization {
int a;
int aField;
@@ -23,5 +10,3 @@ class SetterWithJavaBeansSpecCapitalization {
this.aField = aField;
}
}
-
-
diff --git a/test/transform/resource/after-delombok/ValueWithJavaBeansSpecCapitalization.java b/test/transform/resource/after-delombok/ValueWithJavaBeansSpecCapitalization.java
index 20139baf..b92dd5b6 100644
--- a/test/transform/resource/after-delombok/ValueWithJavaBeansSpecCapitalization.java
+++ b/test/transform/resource/after-delombok/ValueWithJavaBeansSpecCapitalization.java
@@ -1,16 +1,13 @@
final class ValueWithJavaBeansSpecCapitalization {
private final int aField;
-
@java.lang.SuppressWarnings("all")
public ValueWithJavaBeansSpecCapitalization(final int aField) {
this.aField = aField;
}
-
@java.lang.SuppressWarnings("all")
public int getaField() {
return this.aField;
}
-
@java.lang.Override
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
@@ -20,7 +17,6 @@ final class ValueWithJavaBeansSpecCapitalization {
if (this.getaField() != other.getaField()) return false;
return true;
}
-
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
@@ -29,27 +25,22 @@ final class ValueWithJavaBeansSpecCapitalization {
result = result * PRIME + this.getaField();
return result;
}
-
@java.lang.Override
@java.lang.SuppressWarnings("all")
public java.lang.String toString() {
return "ValueWithJavaBeansSpecCapitalization(aField=" + this.getaField() + ")";
}
}
-
final class ValueWithoutJavaBeansSpecCapitalization {
private final int aField;
-
@java.lang.SuppressWarnings("all")
public ValueWithoutJavaBeansSpecCapitalization(final int aField) {
this.aField = aField;
}
-
@java.lang.SuppressWarnings("all")
public int getAField() {
return this.aField;
}
-
@java.lang.Override
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
@@ -59,7 +50,6 @@ final class ValueWithoutJavaBeansSpecCapitalization {
if (this.getAField() != other.getAField()) return false;
return true;
}
-
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
@@ -68,7 +58,6 @@ final class ValueWithoutJavaBeansSpecCapitalization {
result = result * PRIME + this.getAField();
return result;
}
-
@java.lang.Override
@java.lang.SuppressWarnings("all")
public java.lang.String toString() {
diff --git a/test/transform/resource/after-delombok/WithOnJavaBeansSpecCapitalization.java b/test/transform/resource/after-delombok/WithOnJavaBeansSpecCapitalization.java
deleted file mode 100644
index afed2f0e..00000000
--- a/test/transform/resource/after-delombok/WithOnJavaBeansSpecCapitalization.java
+++ /dev/null
@@ -1,29 +0,0 @@
-class WithOnJavaBeansSpecCapitalization {
- int aField;
-
- WithOnJavaBeansSpecCapitalization(int aField) {
- }
-
- /**
- * @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
- */
- @java.lang.SuppressWarnings("all")
- public WithOnJavaBeansSpecCapitalization withaField(final int aField) {
- return this.aField == aField ? this : new WithOnJavaBeansSpecCapitalization(aField);
- }
-}
-
-class WithOffJavaBeansSpecCapitalization {
- int aField;
-
- WithOffJavaBeansSpecCapitalization(int aField) {
- }
-
- /**
- * @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
- */
- @java.lang.SuppressWarnings("all")
- public WithOffJavaBeansSpecCapitalization withAField(final int aField) {
- return this.aField == aField ? this : new WithOffJavaBeansSpecCapitalization(aField);
- }
-}
diff --git a/test/transform/resource/after-delombok/WithWithJavaBeansSpecCapitalization.java b/test/transform/resource/after-delombok/WithWithJavaBeansSpecCapitalization.java
new file mode 100644
index 00000000..e3737848
--- /dev/null
+++ b/test/transform/resource/after-delombok/WithWithJavaBeansSpecCapitalization.java
@@ -0,0 +1,12 @@
+class WithWithJavaBeansSpecCapitalization {
+ int aField;
+ WithWithJavaBeansSpecCapitalization(int aField) {
+ }
+ /**
+ * @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
+ */
+ @java.lang.SuppressWarnings("all")
+ public WithWithJavaBeansSpecCapitalization withaField(final int aField) {
+ return this.aField == aField ? this : new WithWithJavaBeansSpecCapitalization(aField);
+ }
+}
diff --git a/test/transform/resource/after-ecj/BuilderWithJavaBeansSpecCapitalization.java b/test/transform/resource/after-ecj/BuilderWithJavaBeansSpecCapitalization.java
new file mode 100644
index 00000000..1107254f
--- /dev/null
+++ b/test/transform/resource/after-ecj/BuilderWithJavaBeansSpecCapitalization.java
@@ -0,0 +1,99 @@
+@lombok.Builder(setterPrefix = "set") class BuilderWithJavaBeansSpecCapitalization {
+ public static @java.lang.SuppressWarnings("all") class BuilderWithJavaBeansSpecCapitalizationBuilder {
+ private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> a;
+ private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> aField;
+ private @java.lang.SuppressWarnings("all") String bField;
+ @java.lang.SuppressWarnings("all") BuilderWithJavaBeansSpecCapitalizationBuilder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder setZ(final String z) {
+ if ((this.a == null))
+ this.a = new java.util.ArrayList<String>();
+ this.a.add(z);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder setA(final java.util.Collection<? extends String> a) {
+ if ((a == null))
+ {
+ throw new java.lang.NullPointerException("a cannot be null");
+ }
+ if ((this.a == null))
+ this.a = new java.util.ArrayList<String>();
+ this.a.addAll(a);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder clearA() {
+ if ((this.a != null))
+ this.a.clear();
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder setyField(final String yField) {
+ if ((this.aField == null))
+ this.aField = new java.util.ArrayList<String>();
+ this.aField.add(yField);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder setaField(final java.util.Collection<? extends String> aField) {
+ if ((aField == null))
+ {
+ throw new java.lang.NullPointerException("aField cannot be null");
+ }
+ if ((this.aField == null))
+ this.aField = new java.util.ArrayList<String>();
+ this.aField.addAll(aField);
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder clearaField() {
+ if ((this.aField != null))
+ this.aField.clear();
+ return this;
+ }
+ /**
+ * @return {@code this}.
+ */
+ public @java.lang.SuppressWarnings("all") BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder setbField(final String bField) {
+ this.bField = bField;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithJavaBeansSpecCapitalization build() {
+ java.util.List<String> a;
+ switch (((this.a == null) ? 0 : this.a.size())) {
+ case 0 :
+ a = java.util.Collections.emptyList();
+ break;
+ case 1 :
+ a = java.util.Collections.singletonList(this.a.get(0));
+ break;
+ default :
+ a = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.a));
+ }
+ java.util.List<String> aField;
+ switch (((this.aField == null) ? 0 : this.aField.size())) {
+ case 0 :
+ aField = java.util.Collections.emptyList();
+ break;
+ case 1 :
+ aField = java.util.Collections.singletonList(this.aField.get(0));
+ break;
+ default :
+ aField = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.aField));
+ }
+ return new BuilderWithJavaBeansSpecCapitalization(a, aField, this.bField);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (((((("BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder(a=" + this.a) + ", aField=") + this.aField) + ", bField=") + this.bField) + ")");
+ }
+ }
+ @lombok.Singular("z") java.util.List<String> a;
+ @lombok.Singular("yField") java.util.List<String> aField;
+ String bField;
+ @java.lang.SuppressWarnings("all") BuilderWithJavaBeansSpecCapitalization(final java.util.List<String> a, final java.util.List<String> aField, final String bField) {
+ super();
+ this.a = a;
+ this.aField = aField;
+ this.bField = bField;
+ }
+ public static @java.lang.SuppressWarnings("all") BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder builder() {
+ return new BuilderWithJavaBeansSpecCapitalization.BuilderWithJavaBeansSpecCapitalizationBuilder();
+ }
+}
diff --git a/test/transform/resource/after-ecj/GetterWithJavaBeansSpecCapitalization.java b/test/transform/resource/after-ecj/GetterWithJavaBeansSpecCapitalization.java
index d605b4ac..745529a0 100644
--- a/test/transform/resource/after-ecj/GetterWithJavaBeansSpecCapitalization.java
+++ b/test/transform/resource/after-ecj/GetterWithJavaBeansSpecCapitalization.java
@@ -1,33 +1,13 @@
-class GetterWithoutJavaBeansSpecCapitalization {
+class GetterWithJavaBeansSpecCapitalization {
@lombok.Getter int a;
@lombok.Getter int aField;
-
- GetterWithoutJavaBeansSpecCapitalization() {
- super();
- }
-
- public @java.lang.SuppressWarnings("all") int getA() {
- return this.a;
- }
-
- public @java.lang.SuppressWarnings("all") int getAField() {
- return this.aField;
- }
-}
-
-@lombok.experimental.Accessors(javaBeansSpecCapitalization = true) class GetterWithJavaBeansSpecCapitalization {
- @lombok.Getter int a;
- @lombok.Getter int aField;
-
GetterWithJavaBeansSpecCapitalization() {
super();
}
-
public @java.lang.SuppressWarnings("all") int getA() {
return this.a;
}
-
public @java.lang.SuppressWarnings("all") int getaField() {
return this.aField;
}
-}
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/SetterWithJavaBeansSpecCapitalization.java b/test/transform/resource/after-ecj/SetterWithJavaBeansSpecCapitalization.java
index 9907621f..4e99890a 100644
--- a/test/transform/resource/after-ecj/SetterWithJavaBeansSpecCapitalization.java
+++ b/test/transform/resource/after-ecj/SetterWithJavaBeansSpecCapitalization.java
@@ -1,33 +1,13 @@
-class SetterWithoutJavaBeansSpecCapitalization {
+class SetterWithJavaBeansSpecCapitalization {
@lombok.Setter int a;
@lombok.Setter int aField;
-
- SetterWithoutJavaBeansSpecCapitalization() {
- super();
- }
-
- public @java.lang.SuppressWarnings("all") void setA(final int a) {
- this.a = a;
- }
-
- public @java.lang.SuppressWarnings("all") void setAField(final int aField) {
- this.aField = aField;
- }
-}
-
-@lombok.experimental.Accessors(javaBeansSpecCapitalization = true) class SetterWithJavaBeansSpecCapitalization {
- @lombok.Setter int a;
- @lombok.Setter int aField;
-
SetterWithJavaBeansSpecCapitalization() {
super();
}
-
public @java.lang.SuppressWarnings("all") void setA(final int a) {
this.a = a;
}
-
public @java.lang.SuppressWarnings("all") void setaField(final int aField) {
this.aField = aField;
}
-}
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/ValueWithJavaBeansSpecCapitalization.java b/test/transform/resource/after-ecj/ValueWithJavaBeansSpecCapitalization.java
index f41fcf58..8117dbb0 100644
--- a/test/transform/resource/after-ecj/ValueWithJavaBeansSpecCapitalization.java
+++ b/test/transform/resource/after-ecj/ValueWithJavaBeansSpecCapitalization.java
@@ -1,4 +1,4 @@
-final @lombok.Value @lombok.experimental.Accessors(javaBeansSpecCapitalization = true) class ValueWithJavaBeansSpecCapitalization {
+final @lombok.Value class ValueWithJavaBeansSpecCapitalization {
private final int aField;
public @java.lang.SuppressWarnings("all") int getaField() {
return this.aField;
@@ -27,32 +27,3 @@ final @lombok.Value @lombok.experimental.Accessors(javaBeansSpecCapitalization =
this.aField = aField;
}
}
-final @lombok.Value class ValueWithoutJavaBeansSpecCapitalization {
- private final int aField;
- public @java.lang.SuppressWarnings("all") int getAField() {
- return this.aField;
- }
- public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) {
- if ((o == this))
- return true;
- if ((! (o instanceof ValueWithoutJavaBeansSpecCapitalization)))
- return false;
- final ValueWithoutJavaBeansSpecCapitalization other = (ValueWithoutJavaBeansSpecCapitalization) o;
- if ((this.getAField() != other.getAField()))
- return false;
- return true;
- }
- public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() {
- final int PRIME = 59;
- int result = 1;
- result = ((result * PRIME) + this.getAField());
- return result;
- }
- public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
- return (("ValueWithoutJavaBeansSpecCapitalization(aField=" + this.getAField()) + ")");
- }
- public @java.lang.SuppressWarnings("all") ValueWithoutJavaBeansSpecCapitalization(final int aField) {
- super();
- this.aField = aField;
- }
-}
diff --git a/test/transform/resource/after-ecj/WithOnJavaBeansSpecCapitalization.java b/test/transform/resource/after-ecj/WithOnJavaBeansSpecCapitalization.java
deleted file mode 100644
index 06164fe9..00000000
--- a/test/transform/resource/after-ecj/WithOnJavaBeansSpecCapitalization.java
+++ /dev/null
@@ -1,25 +0,0 @@
-@lombok.With @lombok.experimental.Accessors(javaBeansSpecCapitalization = true) class WithOnJavaBeansSpecCapitalization {
- int aField;
- WithOnJavaBeansSpecCapitalization(int aField) {
- super();
- }
- /**
- * @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
- */
- public @java.lang.SuppressWarnings("all") WithOnJavaBeansSpecCapitalization withaField(final int aField) {
- return ((this.aField == aField) ? this : new WithOnJavaBeansSpecCapitalization(aField));
- }
-}
-
-@lombok.With class WithOffJavaBeansSpecCapitalization {
- int aField;
- WithOffJavaBeansSpecCapitalization(int aField) {
- super();
- }
- /**
- * @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
- */
- public @java.lang.SuppressWarnings("all") WithOffJavaBeansSpecCapitalization withAField(final int aField) {
- return ((this.aField == aField) ? this : new WithOffJavaBeansSpecCapitalization(aField));
- }
-}
diff --git a/test/transform/resource/after-ecj/WithWithJavaBeansSpecCapitalization.java b/test/transform/resource/after-ecj/WithWithJavaBeansSpecCapitalization.java
new file mode 100644
index 00000000..d530ad8a
--- /dev/null
+++ b/test/transform/resource/after-ecj/WithWithJavaBeansSpecCapitalization.java
@@ -0,0 +1,12 @@
+@lombok.With class WithOnJavaBeansSpecCapitalization {
+ int aField;
+ WithWithJavaBeansSpecCapitalization(int aField) {
+ super();
+ }
+ /**
+ * @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
+ */
+ public @java.lang.SuppressWarnings("all") WithWithJavaBeansSpecCapitalization withaField(final int aField) {
+ return ((this.aField == aField) ? this : new WithWithJavaBeansSpecCapitalization(aField));
+ }
+}
diff --git a/test/transform/resource/before/BuilderWithJavaBeansSpecCapitalization.java b/test/transform/resource/before/BuilderWithJavaBeansSpecCapitalization.java
new file mode 100644
index 00000000..db1fe15f
--- /dev/null
+++ b/test/transform/resource/before/BuilderWithJavaBeansSpecCapitalization.java
@@ -0,0 +1,7 @@
+//CONF: lombok.accessors.capitalization = beanspec
+@lombok.Builder(setterPrefix = "set")
+class BuilderWithJavaBeansSpecCapitalization {
+ @lombok.Singular("z") java.util.List<String> a;
+ @lombok.Singular("yField") java.util.List<String> aField;
+ String bField;
+}
diff --git a/test/transform/resource/before/GetterWithJavaBeansSpecCapitalization.java b/test/transform/resource/before/GetterWithJavaBeansSpecCapitalization.java
index 3c27317c..68f41e3d 100644
--- a/test/transform/resource/before/GetterWithJavaBeansSpecCapitalization.java
+++ b/test/transform/resource/before/GetterWithJavaBeansSpecCapitalization.java
@@ -1,11 +1,5 @@
-class GetterWithoutJavaBeansSpecCapitalization {
- @lombok.Getter int a;
- @lombok.Getter int aField;
-}
-
-@lombok.experimental.Accessors(javaBeansSpecCapitalization=true)
+//CONF: lombok.accessors.capitalization = beanspec
class GetterWithJavaBeansSpecCapitalization {
@lombok.Getter int a;
@lombok.Getter int aField;
}
-
diff --git a/test/transform/resource/before/SetterWithJavaBeansSpecCapitalization.java b/test/transform/resource/before/SetterWithJavaBeansSpecCapitalization.java
index 80a1b4ee..b5e34ba7 100644
--- a/test/transform/resource/before/SetterWithJavaBeansSpecCapitalization.java
+++ b/test/transform/resource/before/SetterWithJavaBeansSpecCapitalization.java
@@ -1,11 +1,5 @@
-class SetterWithoutJavaBeansSpecCapitalization {
- @lombok.Setter int a;
- @lombok.Setter int aField;
-}
-
-@lombok.experimental.Accessors(javaBeansSpecCapitalization=true)
+//CONF: lombok.accessors.capitalization = beanspec
class SetterWithJavaBeansSpecCapitalization {
@lombok.Setter int a;
@lombok.Setter int aField;
}
-
diff --git a/test/transform/resource/before/ValueWithJavaBeansSpecCapitalization.java b/test/transform/resource/before/ValueWithJavaBeansSpecCapitalization.java
index f0044ed9..7c001f6e 100644
--- a/test/transform/resource/before/ValueWithJavaBeansSpecCapitalization.java
+++ b/test/transform/resource/before/ValueWithJavaBeansSpecCapitalization.java
@@ -1,10 +1,5 @@
+//CONF: lombok.accessors.capitalization = beanspec
@lombok.Value
-@lombok.experimental.Accessors(javaBeansSpecCapitalization = true)
class ValueWithJavaBeansSpecCapitalization {
final int aField;
}
-
-@lombok.Value
-class ValueWithoutJavaBeansSpecCapitalization {
- final int aField;
-}
diff --git a/test/transform/resource/before/WithOnJavaBeansSpecCapitalization.java b/test/transform/resource/before/WithOnJavaBeansSpecCapitalization.java
deleted file mode 100644
index 476fb5a4..00000000
--- a/test/transform/resource/before/WithOnJavaBeansSpecCapitalization.java
+++ /dev/null
@@ -1,16 +0,0 @@
-@lombok.With
-@lombok.experimental.Accessors(javaBeansSpecCapitalization = true)
-class WithOnJavaBeansSpecCapitalization {
- int aField;
-
- WithOnJavaBeansSpecCapitalization(int aField) {
- }
-}
-
-@lombok.With
-class WithOffJavaBeansSpecCapitalization {
- int aField;
-
- WithOffJavaBeansSpecCapitalization(int aField) {
- }
-}
diff --git a/test/transform/resource/before/WithWithJavaBeansSpecCapitalization.java b/test/transform/resource/before/WithWithJavaBeansSpecCapitalization.java
new file mode 100644
index 00000000..ef4a78ad
--- /dev/null
+++ b/test/transform/resource/before/WithWithJavaBeansSpecCapitalization.java
@@ -0,0 +1,8 @@
+//CONF: lombok.accessors.capitalization = beanspec
+@lombok.With
+class WithWithJavaBeansSpecCapitalization {
+ int aField;
+
+ WithWithJavaBeansSpecCapitalization(int aField) {
+ }
+}