diff options
| author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-01-20 15:25:08 +0100 |
|---|---|---|
| committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-01-28 16:21:39 +0100 |
| commit | e95680a76733c22ee5937a586ee50c703d5ba621 (patch) | |
| tree | 3eaefce07c41760468c3c2a17c86297e2304a730 /website/templates/features/configuration.html | |
| parent | fa70b194aa7db62bdbc4cc759a606f97fe50fc92 (diff) | |
| download | lombok-e95680a76733c22ee5937a586ee50c703d5ba621.tar.gz lombok-e95680a76733c22ee5937a586ee50c703d5ba621.tar.bz2 lombok-e95680a76733c22ee5937a586ee50c703d5ba621.zip | |
[issue #2221] [issue #788] Lombok now adds nullity annotations.
Which 'flavour' is defined in lombok.config; applied to toString, equals, canEqual, and plural-form of `@Singular`.
Diffstat (limited to 'website/templates/features/configuration.html')
| -rw-r--r-- | website/templates/features/configuration.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/website/templates/features/configuration.html b/website/templates/features/configuration.html index 4d7b1547..26d9af4f 100644 --- a/website/templates/features/configuration.html +++ b/website/templates/features/configuration.html @@ -80,6 +80,12 @@ </ol> can be included. We suggest you put this in the root of your workspace directory. </p><p> + Lombok can add nullity annotations (usually called <code>@NonNull</code> and <code>@Nullable</code>) whenever it makes sense to do so; think of generated <a href="ToString"><code>toString</code></a> and <a href="with"><code>withX</code> methods (these never return null), or the parameter of a generated <a href="EqualsAndHashCode"><code>equals</code></a> method, which is allowed to be null, and requires such an annotation if you've set up your IDE for strict null checks as well as 'parameters are non-null by default'. There are many such libraries; you must tell lombok which one to use. By default, no such annotations are added. Enable this feature with: + <div class="snippet example"> + <code>lombok.addNullAnnotations = <em>flavour</em></code> (flavours: <code>javax</code> (=JSR305; not recommended), <code>eclipse</code>, <code>jetbrains</code>, <code>netbeans</code>, <code>androidx</code>, <code>android.support</code> (deprecated within android), <code>checkerframework</code> (recommended), <code>findbugs</code>, <code>spring</code>, <code>jml</code>, or define your own via <code>CUSTOM:fully.qualified.NonNullAnnotation:fully.qualified.NullableAnnotation</code>. + </div> + <em>This feature was introduced in lombok v1.20.0</em>. + </p><p> Lombok can add <code>@javax.annotation.Generated</code> annotations to all generated nodes where possible. You can enable this with: <ol class="snippet example oneliner"> <li><code>lombok.addJavaxGeneratedAnnotation = true</code></li> |
