mirror of
https://github.com/tiennm99/lombok.git
synced 2026-09-20 04:23:33 +00:00
[trivial] minor updates to Jacksonized docs.
This commit is contained in:
5 files changed
+10
-9
No files matched your search
@@ -2,13 +2,13 @@ Lombok Changelog
|
||||
----------------
|
||||
|
||||
### v1.18.13 "Edgy Guinea Pig"
|
||||
* BREAKING CHANGE: mapstruct users should not add a dependency to lombok-mapstruct-binding. This solves compiling modules with lombok (and mapstruct).
|
||||
* BREAKING CHANGE: mapstruct users should now add a dependency to lombok-mapstruct-binding. This solves compiling modules with lombok (and mapstruct).
|
||||
* FEATURE: Similar to `@Builder`, you can now configure a `@SuperBuilder`'s 'setter' prefixes via `@SuperBuilder(setterPrefix = "set")` for example. We still discourage doing this. [Pull Request #2357](https://github.com/rzwitserloot/lombok/pull/2357).
|
||||
* FEATURE: If using `@Synchronized("lockVar")`, if `lockVar` is referring to a static field, the code lombok generates no longer causes a warning about accessing a static entity incorrectly. [Issue #678](https://github.com/rzwitserloot/lombok/issues/678)
|
||||
* BUGFIX: Using `@SuperBuilder` on a class that has some fairly convoluted generics usage would fail with 'Wrong number of type arguments'. [Issue #2359](https://github.com/rzwitserloot/lombok/issues/2359) [Pull Request #2362](https://github.com/rzwitserloot/lombok/pull/2362)
|
||||
* BUGFIX: Various lombok annotations on classes nested inside enums or interfaces would cause errors in eclipse. [Issue #2369](https://github.com/rzwitserloot/lombok/issues/2369)
|
||||
* BUGFIX: Trying to add `@ExtensionMethod`s with exactly 2 arguments would fail in eclipse. [Issue #1441](https://github.com/rzwitserloot/lombok/issues/1441) [Pull Request #2376](https://github.com/rzwitserloot/lombok/pull/2376) thanks to __@Rawi01__.
|
||||
* FEATURE: `@Jacksonized` on a `@Builder` or `@SuperBuilder` will configure [Jackson](https://github.com/FasterXML/jackson) to use this builder when deserializing. [Pull Request #2387](https://github.com/rzwitserloot/lombok/pull/2387). [@Jacksonized documentation](https://projectlombok.org/features/experimental/Jacksonized).
|
||||
* FEATURE: `@Jacksonized` on a `@Builder` or `@SuperBuilder` will configure [Jackson](https://github.com/FasterXML/jackson) to use this builder when deserializing. [Pull Request #2387](https://github.com/rzwitserloot/lombok/pull/2387) thanks to __@JanRieke__. [@Jacksonized documentation](https://projectlombok.org/features/experimental/Jacksonized).
|
||||
|
||||
### v1.18.12 (February 1st, 2020)
|
||||
* PLATFORM: Support for JDK13 (including `yield` in switch expressions, as well as delombok having a nicer style for arrow-style switch blocks, and text blocks).
|
||||
|
||||
@@ -74,6 +74,8 @@
|
||||
</ul>
|
||||
Example usage where all options are changed from their defaults:<br />
|
||||
<code>@Builder(builderClassName = "HelloWorldBuilder", buildMethodName = "execute", builderMethodName = "helloWorld", toBuilder = true, access = AccessLevel.PRIVATE, setterPrefix = "set")</code><br />
|
||||
</p><p>
|
||||
Looking to use your builder with <a href="https://github.com/FasterXML/jackson">Jackson</a>, the JSON/XML tool? We have you covered: Check out the <a href="/features/experimental/Jacksonized">@Jacksonized</a> feature.
|
||||
</p>
|
||||
</@f.overview>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<#import "../_features.html" as f>
|
||||
|
||||
<@f.scaffold title="@Jacksonized" logline="Make Jackson use your builders.">
|
||||
<@f.scaffold title="@Jacksonized" logline="Bob, meet Jackson. Lets make sure you become fast friends.">
|
||||
<@f.history>
|
||||
<p>
|
||||
<code>@Jacksonized</code> was introduced as experimental feature in lombok v1.18.14.
|
||||
@@ -22,10 +22,7 @@ public class JacksonExample {
|
||||
}
|
||||
</pre></div></div>
|
||||
</p><p>
|
||||
This annotation is especially useful when deserializing into immutable (sub-)classes that only use <code>@SuperBuilder</code> to create instances.
|
||||
With <code>@Jacksonized</code>, you do not have to put the complex <code>@SuperBuilder</code> class header into your code just to configure it for Jackson.
|
||||
</p><p>
|
||||
This annotation does <i>not</i> change the behavior of the generated builder.
|
||||
This annotation does <em>not</em> change the behavior of the generated builder.
|
||||
A <code>@Jacksonized</code> <code>@SuperBuilder</code> remains fully compatible to regular <code>@SuperBuilder</code>s.
|
||||
</p>
|
||||
</@f.overview>
|
||||
@@ -35,7 +32,7 @@ public class JacksonExample {
|
||||
In particular, the annotation does the following:
|
||||
<ul>
|
||||
<li>
|
||||
Configure Jackson to use the builder for deserialization using <code>@JsonDeserialize(builder=<em>Foobar</em>.<em>Foobar</em>Builder[Impl].class))</code> on the class (where <em>Foobar</em> is the name of the annotated class).
|
||||
Configure Jackson to use the builder for deserialization using <code>@JsonDeserialize(builder=<em>Foobar</em>.<em>Foobar</em>Builder[Impl].class))</code> on the class (where <em>Foobar</em> is the name of the annotated class, and <code>Impl</code> is added for <code>@SuperBuilder</code>).
|
||||
(An error is emitted if such an annotation already exists.)
|
||||
</li><li>
|
||||
Copy Jackson-related configuration annotations (like <code>@JsonIgnoreProperties</code>) from the class to the builder class.
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
</ul>
|
||||
Example usage where all options are changed from their defaults:<br />
|
||||
<code>@SuperBuilder(buildMethodName = "execute", builderMethodName = "helloWorld", toBuilder = true, setterPrefix = "set")</code><br />
|
||||
</p><p>
|
||||
Looking to use your superbuilder with <a href="https://github.com/FasterXML/jackson">Jackson</a>, the JSON/XML tool? We have you covered: Check out the <a href="/features/experimental/Jacksonized">@Jacksonized</a> feature.
|
||||
</p>
|
||||
</@f.overview>
|
||||
|
||||
|
||||
@@ -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>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user