diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-08-02 15:44:40 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-08-02 15:52:34 +0200 |
commit | c21adf7f47ed0077c53547a36041b1dba45bdcb8 (patch) | |
tree | e26a16c3833a9a0d593a41ced92d48342e577550 /website/templates | |
parent | 6b84e38152be3bfe5bc06bb6061ddc95d78f65e8 (diff) | |
download | lombok-c21adf7f47ed0077c53547a36041b1dba45bdcb8.tar.gz lombok-c21adf7f47ed0077c53547a36041b1dba45bdcb8.tar.bz2 lombok-c21adf7f47ed0077c53547a36041b1dba45bdcb8.zip |
[website] added some ugly docs on how to interop jackson and builder. We need to make this prettier later and add the magic for how to interop Singular with Jackson later.
Diffstat (limited to 'website/templates')
-rw-r--r-- | website/templates/features/Builder.html | 21 |
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<Foo> foos; + + @JsonPOJOBuilder(withPrefix = "") + public static class JacksonExampleBuilder implements JacksonExampleBuilderMeta { + } + + private interface JacksonExampleBuilderMeta { + @JsonDeserialize(contentAs = FooImpl.class) JacksonExampleBuilder foos(List<? extends Foo> foos) + } +} +</pre></div></div> + </p> + </@f.featureSection> + <@f.snippets name="Builder" /> <@f.confKeys> |