From bd78d0841775b1a1c91ed4eef1defc62b33e9ed5 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 16 Nov 2015 23:46:12 +0100 Subject: [builder] Added clearX() functionality for `@Singular` annotations for javac. Also docs and changelog. --- website/features/Builder.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'website/features/Builder.html') diff --git a/website/features/Builder.html b/website/features/Builder.html index 6cf46600..582be3b4 100644 --- a/website/features/Builder.html +++ b/website/features/Builder.html @@ -18,7 +18,8 @@ @Builder was introduced as experimental feature in lombok v0.12.0.

@Builder gained @Singular support and was promoted to the main lombok package since lombok v1.16.0. -

+

+ @Builder with @Singular adds a clear method since lombok v1.16.8.

Overview

@@ -82,11 +83,11 @@

By annotating one of the parameters (if annotating a static method or constructor with @Builder) or fields (if annotating a class with @Builder) with the @Singular annotation, lombok will treat that builder node as a collection, and it generates 2 'adder' methods instead of a 'setter' method. One which adds a single element to the collection, and one - which adds all elements of another collection to the collection. No setter to just set the collection (replacing whatever was already added) will be generated. These 'singular' builders + which adds all elements of another collection to the collection. No setter to just set the collection (replacing whatever was already added) will be generated. A 'clear' method is also generated. These 'singular' builders are very complicated in order to guarantee the following properties:

-- cgit