From dc641cc3696e63c46c9693ccdfd296f173afec53 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 5 Nov 2018 23:39:02 +0100 Subject: [fixes #1912] clarifying builder’s behaviour about generating constructors in the face of already present ones. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/lombok/Builder.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/core/lombok/Builder.java b/src/core/lombok/Builder.java index d7a2a109..705fe657 100644 --- a/src/core/lombok/Builder.java +++ b/src/core/lombok/Builder.java @@ -35,6 +35,10 @@ import java.lang.annotation.Target; * then a private constructor is generated with all fields as arguments * (as if {@code @AllArgsConstructor(AccessLevel.PRIVATE)} is present * on the class), and it is as if this constructor has been annotated with {@code @Builder} instead. + * Note that this constructor is only generated if you haven't written any constructors and also haven't + * added any explicit {@code @XArgsConstructor} annotations. In those cases, lombok will assume an all-args + * constructor is present and generate code that uses it; this means you'd get a compiler error if this + * constructor is not present. *

* The effect of {@code @Builder} is that an inner class is generated named TBuilder, * with a private constructor. Instances of TBuilder are made with the -- cgit