aboutsummaryrefslogtreecommitdiff
path: root/website/templates/features/Builder.html
diff options
context:
space:
mode:
authorPhilippe Charles <charphi@users.noreply.github.com>2018-08-22 09:54:00 +0200
committerGitHub <noreply@github.com>2018-08-22 09:54:00 +0200
commit3ffac6642456e2c7d32952c62df8a565e2d4728b (patch)
treeb0a28ac208dcb8af9add494c4caffe4f11bb287b /website/templates/features/Builder.html
parent35c7c6bda2e71da2e6e06cec5b0fb012c348f694 (diff)
parent769185e123dfd4a073161eafb58ce50bb79d6201 (diff)
downloadlombok-3ffac6642456e2c7d32952c62df8a565e2d4728b.tar.gz
lombok-3ffac6642456e2c7d32952c62df8a565e2d4728b.tar.bz2
lombok-3ffac6642456e2c7d32952c62df8a565e2d4728b.zip
Merge branch 'master' into master
Diffstat (limited to 'website/templates/features/Builder.html')
-rw-r--r--website/templates/features/Builder.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/website/templates/features/Builder.html b/website/templates/features/Builder.html
index 4693d222..bc03749e 100644
--- a/website/templates/features/Builder.html
+++ b/website/templates/features/Builder.html
@@ -129,6 +129,27 @@
</p>
</@f.featureSection>
+ <@f.featureSection>
+ <h3 id="jackson"><a name="jackson">With Jackson</a></h3>
+ <p>
+ You can customize parts of your builder, for example adding another method to the builder class, or annotating a method in the builder class, by making the builder class yourself. Lombok will generate everything that you do not manually add, and put it into this builder class. For example, if you are trying to configure <a href="https://github.com/FasterXML/jackson">jackson</a> to use a specific subtype for a collection, you can write something like:<div class="snippet"><div class="java" align="left"><pre>
+@Value @Builder
+@JsonDeserialize(builder = JacksonExample.JacksonExampleBuilder.class)
+public class JacksonExample {
+ @Singular private List&lt;Foo&gt; foos;
+
+ @JsonPOJOBuilder(withPrefix = "")
+ public static class JacksonExampleBuilder implements JacksonExampleBuilderMeta {
+ }
+
+ private interface JacksonExampleBuilderMeta {
+ @JsonDeserialize(contentAs = FooImpl.class) JacksonExampleBuilder foos(List&lt;? extends Foo&gt; foos)
+ }
+}
+</pre></div></div>
+ </p>
+ </@f.featureSection>
+
<@f.snippets name="Builder" />
<@f.confKeys>