aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before
diff options
context:
space:
mode:
authorJan Rieke <it@janrieke.de>2020-02-16 15:17:20 +0100
committerJan Rieke <it@janrieke.de>2020-03-03 13:01:48 +0100
commit8be4b0ffe6b5e5f89e8bb3d94e87d0aa98dc5aeb (patch)
tree1fc16ba2d1b271f1c2e06eeb2120a71d74ff75ef /test/transform/resource/before
parent59aa6761115cb912d5223870be348b70e0e9fd9c (diff)
downloadlombok-8be4b0ffe6b5e5f89e8bb3d94e87d0aa98dc5aeb.tar.gz
lombok-8be4b0ffe6b5e5f89e8bb3d94e87d0aa98dc5aeb.tar.bz2
lombok-8be4b0ffe6b5e5f89e8bb3d94e87d0aa98dc5aeb.zip
@Jacksonized: modify builders that they can be used by Jackson
Diffstat (limited to 'test/transform/resource/before')
-rw-r--r--test/transform/resource/before/JacksonizedBuilderComplex.java10
-rw-r--r--test/transform/resource/before/JacksonizedBuilderSimple.java12
-rw-r--r--test/transform/resource/before/JacksonizedSuperBuilderSimple.java12
-rw-r--r--test/transform/resource/before/JacksonizedSuperBuilderWithJsonDeserialize.java6
4 files changed, 40 insertions, 0 deletions
diff --git a/test/transform/resource/before/JacksonizedBuilderComplex.java b/test/transform/resource/before/JacksonizedBuilderComplex.java
new file mode 100644
index 00000000..dec1cd3b
--- /dev/null
+++ b/test/transform/resource/before/JacksonizedBuilderComplex.java
@@ -0,0 +1,10 @@
+//CONF: lombok.builder.className = Test*Name
+import java.util.List;
+import lombok.Builder;
+import lombok.extern.jackson.Jacksonized;
+
+class JacksonizedBuilderComplex {
+ @Jacksonized
+ @Builder(buildMethodName = "execute", setterPrefix = "with")
+ private static <T extends Number> void testVoidWithGenerics(T number, int arg2, String arg3, JacksonizedBuilderComplex selfRef) {}
+}
diff --git a/test/transform/resource/before/JacksonizedBuilderSimple.java b/test/transform/resource/before/JacksonizedBuilderSimple.java
new file mode 100644
index 00000000..6da015ec
--- /dev/null
+++ b/test/transform/resource/before/JacksonizedBuilderSimple.java
@@ -0,0 +1,12 @@
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+@lombok.extern.jackson.Jacksonized
+@JsonIgnoreProperties(ignoreUnknown = true)
+@lombok.Builder(access = lombok.AccessLevel.PROTECTED)
+class JacksonizedBuilderSimple<T> {
+ private final int noshow = 0;
+ private final int yes;
+ private List<T> also;
+ private int $butNotMe;
+}
diff --git a/test/transform/resource/before/JacksonizedSuperBuilderSimple.java b/test/transform/resource/before/JacksonizedSuperBuilderSimple.java
new file mode 100644
index 00000000..1e3bd0fc
--- /dev/null
+++ b/test/transform/resource/before/JacksonizedSuperBuilderSimple.java
@@ -0,0 +1,12 @@
+public class JacksonizedSuperBuilderSimple {
+ @lombok.extern.jackson.Jacksonized
+ @lombok.experimental.SuperBuilder
+ @com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
+ public static class Parent {
+ int field1;
+ }
+
+ public static void test() {
+ Parent x = Parent.builder().field1(5).build();
+ }
+}
diff --git a/test/transform/resource/before/JacksonizedSuperBuilderWithJsonDeserialize.java b/test/transform/resource/before/JacksonizedSuperBuilderWithJsonDeserialize.java
new file mode 100644
index 00000000..0c80d1a6
--- /dev/null
+++ b/test/transform/resource/before/JacksonizedSuperBuilderWithJsonDeserialize.java
@@ -0,0 +1,6 @@
+@lombok.extern.jackson.Jacksonized
+@lombok.experimental.SuperBuilder
+@com.fasterxml.jackson.databind.annotation.JsonDeserialize
+public class JacksonizedSuperBuilderWithJsonDeserialize {
+ int field1;
+}