aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-delombok')
-rw-r--r--test/transform/resource/after-delombok/BuilderSimpleOnRecord.java14
-rw-r--r--test/transform/resource/after-delombok/BuilderSingularOnRecord.java15
-rw-r--r--test/transform/resource/after-delombok/ConstructorsOnRecord.java1
-rw-r--r--test/transform/resource/after-delombok/DataOnRecord.java1
-rw-r--r--test/transform/resource/after-delombok/EqualsAndHashCodeOnRecord.java1
-rw-r--r--test/transform/resource/after-delombok/FieldDefaultsOnRecord.java1
-rw-r--r--test/transform/resource/after-delombok/FieldNameConstantsOnRecord.java2
-rw-r--r--test/transform/resource/after-delombok/GetterOnRecord.java1
-rw-r--r--test/transform/resource/after-delombok/LoggerConfigOnRecord.java1
-rw-r--r--test/transform/resource/after-delombok/LoggerSlf4jNonStaticOnRecord.java1
-rw-r--r--test/transform/resource/after-delombok/LoggerSlf4jOnRecord.java2
-rw-r--r--test/transform/resource/after-delombok/NonNullExistingConstructorOnRecord.java3
-rw-r--r--test/transform/resource/after-delombok/NonNullOnRecord.java3
-rw-r--r--test/transform/resource/after-delombok/SetterOnRecord.java1
-rw-r--r--test/transform/resource/after-delombok/ToStringOnRecord.java1
-rw-r--r--test/transform/resource/after-delombok/UtilityClassOnRecord.java1
-rw-r--r--test/transform/resource/after-delombok/ValueOnRecord.java1
-rw-r--r--test/transform/resource/after-delombok/WithByOnRecord.java2
-rw-r--r--test/transform/resource/after-delombok/WithByOnRecordComponent.java1
-rw-r--r--test/transform/resource/after-delombok/WithOnRecord.java8
-rw-r--r--test/transform/resource/after-delombok/WithOnRecordComponent.java4
21 files changed, 37 insertions, 28 deletions
diff --git a/test/transform/resource/after-delombok/BuilderSimpleOnRecord.java b/test/transform/resource/after-delombok/BuilderSimpleOnRecord.java
index 03aca3aa..aa35cf23 100644
--- a/test/transform/resource/after-delombok/BuilderSimpleOnRecord.java
+++ b/test/transform/resource/after-delombok/BuilderSimpleOnRecord.java
@@ -1,5 +1,5 @@
+// version 14:
import java.util.List;
-
record BuilderSimpleOnRecord<T>(List<T> l, String a) {
@java.lang.SuppressWarnings("all")
protected static class BuilderSimpleOnRecordBuilder<T> {
@@ -7,35 +7,35 @@ record BuilderSimpleOnRecord<T>(List<T> l, String a) {
private List<T> l;
@java.lang.SuppressWarnings("all")
private String a;
-
@java.lang.SuppressWarnings("all")
BuilderSimpleOnRecordBuilder() {
}
-
+ /**
+ * @return {@code this}.
+ */
@java.lang.SuppressWarnings("all")
public BuilderSimpleOnRecord.BuilderSimpleOnRecordBuilder<T> l(final List<T> l) {
this.l = l;
return this;
}
-
+ /**
+ * @return {@code this}.
+ */
@java.lang.SuppressWarnings("all")
public BuilderSimpleOnRecord.BuilderSimpleOnRecordBuilder<T> a(final String a) {
this.a = a;
return this;
}
-
@java.lang.SuppressWarnings("all")
public BuilderSimpleOnRecord<T> build() {
return new BuilderSimpleOnRecord<T>(this.l, this.a);
}
-
@java.lang.Override
@java.lang.SuppressWarnings("all")
public java.lang.String toString() {
return "BuilderSimpleOnRecord.BuilderSimpleOnRecordBuilder(l=" + this.l + ", a=" + this.a + ")";
}
}
-
@java.lang.SuppressWarnings("all")
protected static <T> BuilderSimpleOnRecord.BuilderSimpleOnRecordBuilder<T> builder() {
return new BuilderSimpleOnRecord.BuilderSimpleOnRecordBuilder<T>();
diff --git a/test/transform/resource/after-delombok/BuilderSingularOnRecord.java b/test/transform/resource/after-delombok/BuilderSingularOnRecord.java
index 32b37865..41a976cd 100644
--- a/test/transform/resource/after-delombok/BuilderSingularOnRecord.java
+++ b/test/transform/resource/after-delombok/BuilderSingularOnRecord.java
@@ -1,6 +1,6 @@
+// version 14:
import java.util.Collection;
import java.util.List;
-
record BuilderSingularOnRecord<T>(List<T> children, Collection<? extends Number> scarves, @SuppressWarnings("all") List rawList) {
@java.lang.SuppressWarnings("all")
public static class BuilderSingularOnRecordBuilder<T> {
@@ -10,18 +10,15 @@ record BuilderSingularOnRecord<T>(List<T> children, Collection<? extends Number>
private java.util.ArrayList<Number> scarves;
@java.lang.SuppressWarnings("all")
private java.util.ArrayList<java.lang.Object> rawList;
-
@java.lang.SuppressWarnings("all")
BuilderSingularOnRecordBuilder() {
}
-
@java.lang.SuppressWarnings("all")
public BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> child(final T child) {
if (this.children == null) this.children = new java.util.ArrayList<T>();
this.children.add(child);
return this;
}
-
@java.lang.SuppressWarnings("all")
public BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> children(final java.util.Collection<? extends T> children) {
if (children == null) {
@@ -31,20 +28,17 @@ record BuilderSingularOnRecord<T>(List<T> children, Collection<? extends Number>
this.children.addAll(children);
return this;
}
-
@java.lang.SuppressWarnings("all")
public BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> clearChildren() {
if (this.children != null) this.children.clear();
return this;
}
-
@java.lang.SuppressWarnings("all")
public BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> scarf(final Number scarf) {
if (this.scarves == null) this.scarves = new java.util.ArrayList<Number>();
this.scarves.add(scarf);
return this;
}
-
@java.lang.SuppressWarnings("all")
public BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> scarves(final java.util.Collection<? extends Number> scarves) {
if (scarves == null) {
@@ -54,20 +48,17 @@ record BuilderSingularOnRecord<T>(List<T> children, Collection<? extends Number>
this.scarves.addAll(scarves);
return this;
}
-
@java.lang.SuppressWarnings("all")
public BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> clearScarves() {
if (this.scarves != null) this.scarves.clear();
return this;
}
-
@java.lang.SuppressWarnings("all")
public BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> rawList(final java.lang.Object rawList) {
if (this.rawList == null) this.rawList = new java.util.ArrayList<java.lang.Object>();
this.rawList.add(rawList);
return this;
}
-
@java.lang.SuppressWarnings("all")
public BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> rawList(final java.util.Collection<?> rawList) {
if (rawList == null) {
@@ -77,13 +68,11 @@ record BuilderSingularOnRecord<T>(List<T> children, Collection<? extends Number>
this.rawList.addAll(rawList);
return this;
}
-
@java.lang.SuppressWarnings("all")
public BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> clearRawList() {
if (this.rawList != null) this.rawList.clear();
return this;
}
-
@java.lang.SuppressWarnings("all")
public BuilderSingularOnRecord<T> build() {
java.util.List<T> children;
@@ -121,14 +110,12 @@ record BuilderSingularOnRecord<T>(List<T> children, Collection<? extends Number>
}
return new BuilderSingularOnRecord<T>(children, scarves, rawList);
}
-
@java.lang.Override
@java.lang.SuppressWarnings("all")
public java.lang.String toString() {
return "BuilderSingularOnRecord.BuilderSingularOnRecordBuilder(children=" + this.children + ", scarves=" + this.scarves + ", rawList=" + this.rawList + ")";
}
}
-
@java.lang.SuppressWarnings("all")
public static <T> BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T> builder() {
return new BuilderSingularOnRecord.BuilderSingularOnRecordBuilder<T>();
diff --git a/test/transform/resource/after-delombok/ConstructorsOnRecord.java b/test/transform/resource/after-delombok/ConstructorsOnRecord.java
index 8cef8809..3d091bd5 100644
--- a/test/transform/resource/after-delombok/ConstructorsOnRecord.java
+++ b/test/transform/resource/after-delombok/ConstructorsOnRecord.java
@@ -1,2 +1,3 @@
+// version 14:
record ConstructorsOnRecord(String a, String b) {
}
diff --git a/test/transform/resource/after-delombok/DataOnRecord.java b/test/transform/resource/after-delombok/DataOnRecord.java
index b4384dce..7fde94f9 100644
--- a/test/transform/resource/after-delombok/DataOnRecord.java
+++ b/test/transform/resource/after-delombok/DataOnRecord.java
@@ -1,2 +1,3 @@
+// version 14:
record DataOnRecord(String a, String b) {
}
diff --git a/test/transform/resource/after-delombok/EqualsAndHashCodeOnRecord.java b/test/transform/resource/after-delombok/EqualsAndHashCodeOnRecord.java
index 949cdec6..93213d80 100644
--- a/test/transform/resource/after-delombok/EqualsAndHashCodeOnRecord.java
+++ b/test/transform/resource/after-delombok/EqualsAndHashCodeOnRecord.java
@@ -1,2 +1,3 @@
+// version 14:
record EqualsAndHashCodeOnRecord(String a, String b) {
}
diff --git a/test/transform/resource/after-delombok/FieldDefaultsOnRecord.java b/test/transform/resource/after-delombok/FieldDefaultsOnRecord.java
index 1287dcb0..a7b37d9f 100644
--- a/test/transform/resource/after-delombok/FieldDefaultsOnRecord.java
+++ b/test/transform/resource/after-delombok/FieldDefaultsOnRecord.java
@@ -1,2 +1,3 @@
+// version 14:
record FieldDefaultsOnRecord(String a, String b) {
}
diff --git a/test/transform/resource/after-delombok/FieldNameConstantsOnRecord.java b/test/transform/resource/after-delombok/FieldNameConstantsOnRecord.java
index 2e3339fa..8f29cc96 100644
--- a/test/transform/resource/after-delombok/FieldNameConstantsOnRecord.java
+++ b/test/transform/resource/after-delombok/FieldNameConstantsOnRecord.java
@@ -1,6 +1,6 @@
+// version 14:
record FieldNameConstantsOnRecord(String iAmADvdPlayer, int $skipMe, int andMe, String butPrintMePlease) {
static double skipMeToo;
-
@java.lang.SuppressWarnings("all")
static final class Fields {
public static final java.lang.String iAmADvdPlayer = "iAmADvdPlayer";
diff --git a/test/transform/resource/after-delombok/GetterOnRecord.java b/test/transform/resource/after-delombok/GetterOnRecord.java
index 5090e92d..5b7c5058 100644
--- a/test/transform/resource/after-delombok/GetterOnRecord.java
+++ b/test/transform/resource/after-delombok/GetterOnRecord.java
@@ -1,2 +1,3 @@
+// version 14:
record GetterOnRecord(String a, String b) {
}
diff --git a/test/transform/resource/after-delombok/LoggerConfigOnRecord.java b/test/transform/resource/after-delombok/LoggerConfigOnRecord.java
index 5b43f24e..2ef0bffd 100644
--- a/test/transform/resource/after-delombok/LoggerConfigOnRecord.java
+++ b/test/transform/resource/after-delombok/LoggerConfigOnRecord.java
@@ -1,2 +1,3 @@
+// version 14:
record LoggerConfigOnRecord(String a, String b) {
}
diff --git a/test/transform/resource/after-delombok/LoggerSlf4jNonStaticOnRecord.java b/test/transform/resource/after-delombok/LoggerSlf4jNonStaticOnRecord.java
index e59ed6d3..801c9990 100644
--- a/test/transform/resource/after-delombok/LoggerSlf4jNonStaticOnRecord.java
+++ b/test/transform/resource/after-delombok/LoggerSlf4jNonStaticOnRecord.java
@@ -1,3 +1,4 @@
+// version 14:
record LoggerSlf4jOnRecord(String a, String b) {
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jOnRecord.class);
}
diff --git a/test/transform/resource/after-delombok/LoggerSlf4jOnRecord.java b/test/transform/resource/after-delombok/LoggerSlf4jOnRecord.java
index e59ed6d3..caa2ce2c 100644
--- a/test/transform/resource/after-delombok/LoggerSlf4jOnRecord.java
+++ b/test/transform/resource/after-delombok/LoggerSlf4jOnRecord.java
@@ -1,3 +1,5 @@
+// version 16: the SuppressWarnings is not emitted in java14/15 to work around a javac bug.
record LoggerSlf4jOnRecord(String a, String b) {
+ @java.lang.SuppressWarnings("all")
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jOnRecord.class);
}
diff --git a/test/transform/resource/after-delombok/NonNullExistingConstructorOnRecord.java b/test/transform/resource/after-delombok/NonNullExistingConstructorOnRecord.java
index de2757ee..02b66dd1 100644
--- a/test/transform/resource/after-delombok/NonNullExistingConstructorOnRecord.java
+++ b/test/transform/resource/after-delombok/NonNullExistingConstructorOnRecord.java
@@ -1,5 +1,5 @@
+// version 14:
import lombok.NonNull;
-
record NonNullOnRecord(@NonNull String a, @NonNull String b) {
public NonNullOnRecord(@NonNull String b) {
this("default", b);
@@ -7,7 +7,6 @@ record NonNullOnRecord(@NonNull String a, @NonNull String b) {
throw new java.lang.NullPointerException("b is marked non-null but is null");
}
}
-
@java.lang.SuppressWarnings("all")
public NonNullOnRecord(@NonNull final String a, @NonNull final String b) {
if (a == null) {
diff --git a/test/transform/resource/after-delombok/NonNullOnRecord.java b/test/transform/resource/after-delombok/NonNullOnRecord.java
index 7147f49c..2ff4a8f7 100644
--- a/test/transform/resource/after-delombok/NonNullOnRecord.java
+++ b/test/transform/resource/after-delombok/NonNullOnRecord.java
@@ -1,5 +1,5 @@
+// version 14:
import lombok.NonNull;
-
record NonNullOnRecord(@NonNull String a, @NonNull String b) {
public void method(@NonNull String param) {
if (param == null) {
@@ -7,7 +7,6 @@ record NonNullOnRecord(@NonNull String a, @NonNull String b) {
}
String asd = "a";
}
-
@java.lang.SuppressWarnings("all")
public NonNullOnRecord(@NonNull final String a, @NonNull final String b) {
if (a == null) {
diff --git a/test/transform/resource/after-delombok/SetterOnRecord.java b/test/transform/resource/after-delombok/SetterOnRecord.java
index 39a911ca..31665588 100644
--- a/test/transform/resource/after-delombok/SetterOnRecord.java
+++ b/test/transform/resource/after-delombok/SetterOnRecord.java
@@ -1,2 +1,3 @@
+// version 14:
record SetterOnRecord(String a, String b) {
}
diff --git a/test/transform/resource/after-delombok/ToStringOnRecord.java b/test/transform/resource/after-delombok/ToStringOnRecord.java
index 84db33be..f18508d7 100644
--- a/test/transform/resource/after-delombok/ToStringOnRecord.java
+++ b/test/transform/resource/after-delombok/ToStringOnRecord.java
@@ -1,2 +1,3 @@
+// version 14:
record ToStringOnRecord(String a, String b) {
}
diff --git a/test/transform/resource/after-delombok/UtilityClassOnRecord.java b/test/transform/resource/after-delombok/UtilityClassOnRecord.java
index fbe27370..c6ee509a 100644
--- a/test/transform/resource/after-delombok/UtilityClassOnRecord.java
+++ b/test/transform/resource/after-delombok/UtilityClassOnRecord.java
@@ -1,2 +1,3 @@
+// version 14:
record UtilityClassOnRecord(String a, String b) {
}
diff --git a/test/transform/resource/after-delombok/ValueOnRecord.java b/test/transform/resource/after-delombok/ValueOnRecord.java
index d3d0e6db..4f845c20 100644
--- a/test/transform/resource/after-delombok/ValueOnRecord.java
+++ b/test/transform/resource/after-delombok/ValueOnRecord.java
@@ -1,2 +1,3 @@
+// version 14:
record ValueOnRecord(String a, String b) {
}
diff --git a/test/transform/resource/after-delombok/WithByOnRecord.java b/test/transform/resource/after-delombok/WithByOnRecord.java
index d6a24a9a..6df5c9c4 100644
--- a/test/transform/resource/after-delombok/WithByOnRecord.java
+++ b/test/transform/resource/after-delombok/WithByOnRecord.java
@@ -1,9 +1,9 @@
+// version 14:
record WithByOnRecord(String a, String b) {
@java.lang.SuppressWarnings("all")
public WithByOnRecord withABy(final java.util.function.Function<? super String, ? extends String> transformer) {
return new WithByOnRecord(transformer.apply(this.a), this.b);
}
-
@java.lang.SuppressWarnings("all")
public WithByOnRecord withBBy(final java.util.function.Function<? super String, ? extends String> transformer) {
return new WithByOnRecord(this.a, transformer.apply(this.b));
diff --git a/test/transform/resource/after-delombok/WithByOnRecordComponent.java b/test/transform/resource/after-delombok/WithByOnRecordComponent.java
index 5af50625..91dd7b38 100644
--- a/test/transform/resource/after-delombok/WithByOnRecordComponent.java
+++ b/test/transform/resource/after-delombok/WithByOnRecordComponent.java
@@ -1,3 +1,4 @@
+// version 14:
record WithByOnRecordComponent(String a, String b) {
@java.lang.SuppressWarnings("all")
public WithByOnRecordComponent withABy(final java.util.function.Function<? super String, ? extends String> transformer) {
diff --git a/test/transform/resource/after-delombok/WithOnRecord.java b/test/transform/resource/after-delombok/WithOnRecord.java
index bfb123bc..e981cc20 100644
--- a/test/transform/resource/after-delombok/WithOnRecord.java
+++ b/test/transform/resource/after-delombok/WithOnRecord.java
@@ -1,9 +1,15 @@
+// version 14:
record WithOnRecord(String a, String b) {
+ /**
+ * @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 WithOnRecord withA(final String a) {
return this.a == a ? this : new WithOnRecord(a, this.b);
}
-
+ /**
+ * @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 WithOnRecord withB(final String b) {
return this.b == b ? this : new WithOnRecord(this.a, b);
diff --git a/test/transform/resource/after-delombok/WithOnRecordComponent.java b/test/transform/resource/after-delombok/WithOnRecordComponent.java
index a5f4ec36..5bc72f34 100644
--- a/test/transform/resource/after-delombok/WithOnRecordComponent.java
+++ b/test/transform/resource/after-delombok/WithOnRecordComponent.java
@@ -1,4 +1,8 @@
+// version 14:
record WithOnRecordComponent(String a, String b) {
+ /**
+ * @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 WithOnRecordComponent withA(final String a) {
return this.a == a ? this : new WithOnRecordComponent(a, this.b);