aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-11-05 23:39:02 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-11-05 23:39:02 +0100
commitdc641cc3696e63c46c9693ccdfd296f173afec53 (patch)
tree823592514952205687cf4b2e4bd0ba6b276660f9 /src/core
parenta73965b2b7b4fe2e163cdb7d104fc5dff1aa7476 (diff)
downloadlombok-dc641cc3696e63c46c9693ccdfd296f173afec53.tar.gz
lombok-dc641cc3696e63c46c9693ccdfd296f173afec53.tar.bz2
lombok-dc641cc3696e63c46c9693ccdfd296f173afec53.zip
[fixes #1912] clarifying builder’s behaviour about generating constructors in the face of already present ones.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/Builder.java4
1 files changed, 4 insertions, 0 deletions
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.
* <p>
* The effect of {@code @Builder} is that an inner class is generated named <code><strong>T</strong>Builder</code>,
* with a private constructor. Instances of <code><strong>T</strong>Builder</code> are made with the