From aee4e76d864e01b5d453409e703ad54852fa57bb Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 18 Sep 2018 01:40:32 +0200 Subject: updated docs to reflect change to copyable annotations --- website/templates/features/experimental/SuperBuilder.html | 2 ++ website/templates/features/experimental/Wither.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'website/templates/features/experimental') diff --git a/website/templates/features/experimental/SuperBuilder.html b/website/templates/features/experimental/SuperBuilder.html index 9b49bc83..8189a254 100644 --- a/website/templates/features/experimental/SuperBuilder.html +++ b/website/templates/features/experimental/SuperBuilder.html @@ -63,6 +63,8 @@ An ArrayList is used to store added elements as call methods of a @Singular marked field, if the target collection is from the java.util package, even if the collection is a set or map. Because lombok ensures that generated collections are compacted, a new backing instance of a set or map must be constructed anyway, and storing the data as an ArrayList during the build process is more efficient that storing it as a map or set. This behaviour is not externally visible, an implementation detail of the current implementation of the java.util recipes for @Singular.

The generated builder code heavily relies on generics to avoid class casting when using the builder. +

+ Various well known annotations about nullity cause null checks to be inserted and will be copied to parameter of the builder's 'setter' method. See Getter/Setter documentation's small print for more information.

diff --git a/website/templates/features/experimental/Wither.html b/website/templates/features/experimental/Wither.html index 9642458b..00dc10b1 100644 --- a/website/templates/features/experimental/Wither.html +++ b/website/templates/features/experimental/Wither.html @@ -60,7 +60,7 @@

For boolean fields that start with is immediately followed by a title-case letter, nothing is prefixed to generate the wither name.

- Any annotations named @NonNull (case insensitive) on the field are interpreted as: This field must not ever hold null. Therefore, these annotations result in an explicit null check in the generated wither. Also, these annotations (as well as any annotation named @Nullable or @CheckForNull) are copied to wither parameter. + Various well known annotations about nullity cause null checks to be inserted and will be copied to the parameter. See Getter/Setter documentation's small print for more information.

-- cgit