From 2dc69359f024ac0c20916edd0ba43439393fb7ed Mon Sep 17 00:00:00 2001
From: Reinier Zwitserloot
- This annotation is especially useful when deserializing into immutable (sub-)classes that only use
- This annotation does not change the behavior of the generated builder.
+ This annotation does not change the behavior of the generated builder.
A @Jacksonized
was introduced as experimental feature in lombok v1.18.14.
@@ -22,10 +22,7 @@ public class JacksonExample {
}
@SuperBuilder
to create instances.
- With @Jacksonized
, you do not have to put the complex @SuperBuilder
class header into your code just to configure it for Jackson.
- @Jacksonized
@SuperBuilder
remains fully compatible to regular @SuperBuilder
s.
Example usage where all options are changed from their defaults:@JsonDeserialize(builder=Foobar.FoobarBuilder[Impl].class))
on the class (where Foobar is the name of the annotated class).
+ Configure Jackson to use the builder for deserialization using @JsonDeserialize(builder=Foobar.FoobarBuilder[Impl].class))
on the class (where Foobar is the name of the annotated class, and Impl
is added for @SuperBuilder
).
(An error is emitted if such an annotation already exists.)
@JsonIgnoreProperties
) from the class to the builder class.
diff --git a/website/templates/features/experimental/SuperBuilder.html b/website/templates/features/experimental/SuperBuilder.html
index 0fa81073..c929e8f5 100644
--- a/website/templates/features/experimental/SuperBuilder.html
+++ b/website/templates/features/experimental/SuperBuilder.html
@@ -49,6 +49,8 @@
@SuperBuilder(buildMethodName = "execute", builderMethodName = "helloWorld", toBuilder = true, setterPrefix = "set")
+
+ Looking to use your superbuilder with Jackson, the JSON/XML tool? We have you covered: Check out the @Jacksonized feature.
@f.overview> diff --git a/website/templates/features/experimental/index.html b/website/templates/features/experimental/index.html index dc7870cf..32590815 100644 --- a/website/templates/features/experimental/index.html +++ b/website/templates/features/experimental/index.html @@ -73,7 +73,7 @@ @main.feature> <@main.feature title="@Jacksonized" href="Jacksonized"> - Make Jackson use your builders. + Bob, meet Jackson. Lets make sure you become fast friends. @main.feature> -- cgit