From 8be4b0ffe6b5e5f89e8bb3d94e87d0aa98dc5aeb Mon Sep 17 00:00:00 2001 From: Jan Rieke Date: Sun, 16 Feb 2020 15:17:20 +0100 Subject: @Jacksonized: modify builders that they can be used by Jackson --- .../after-delombok/JacksonizedBuilderSimple.java | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 test/transform/resource/after-delombok/JacksonizedBuilderSimple.java (limited to 'test/transform/resource/after-delombok/JacksonizedBuilderSimple.java') diff --git a/test/transform/resource/after-delombok/JacksonizedBuilderSimple.java b/test/transform/resource/after-delombok/JacksonizedBuilderSimple.java new file mode 100644 index 00000000..bd79df90 --- /dev/null +++ b/test/transform/resource/after-delombok/JacksonizedBuilderSimple.java @@ -0,0 +1,50 @@ +import java.util.List; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +@JsonIgnoreProperties(ignoreUnknown = true) +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = JacksonizedBuilderSimple.JacksonizedBuilderSimpleBuilder.class) +class JacksonizedBuilderSimple { + private final int noshow = 0; + private final int yes; + private List also; + private int $butNotMe; + @java.lang.SuppressWarnings("all") + JacksonizedBuilderSimple(final int yes, final List also) { + this.yes = yes; + this.also = also; + } + @java.lang.SuppressWarnings("all") + @JsonIgnoreProperties(ignoreUnknown = true) + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "", buildMethodName = "build") + protected static class JacksonizedBuilderSimpleBuilder { + @java.lang.SuppressWarnings("all") + private int yes; + @java.lang.SuppressWarnings("all") + private List also; + @java.lang.SuppressWarnings("all") + JacksonizedBuilderSimpleBuilder() { + } + @java.lang.SuppressWarnings("all") + public JacksonizedBuilderSimple.JacksonizedBuilderSimpleBuilder yes(final int yes) { + this.yes = yes; + return this; + } + @java.lang.SuppressWarnings("all") + public JacksonizedBuilderSimple.JacksonizedBuilderSimpleBuilder also(final List also) { + this.also = also; + return this; + } + @java.lang.SuppressWarnings("all") + public JacksonizedBuilderSimple build() { + return new JacksonizedBuilderSimple(this.yes, this.also); + } + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "JacksonizedBuilderSimple.JacksonizedBuilderSimpleBuilder(yes=" + this.yes + ", also=" + this.also + ")"; + } + } + @java.lang.SuppressWarnings("all") + protected static JacksonizedBuilderSimple.JacksonizedBuilderSimpleBuilder builder() { + return new JacksonizedBuilderSimple.JacksonizedBuilderSimpleBuilder(); + } +} -- cgit