aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/Builder.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-05-01 00:41:32 +0200
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-05-01 00:41:32 +0200
commita3180298305ff64e9f671b51d663b750ba7c8efa (patch)
treee95b5b966046d09171c346065c778385af89b72c /src/core/lombok/Builder.java
parentec04d9d7f077b83071de84a337338c9983db43bf (diff)
downloadlombok-a3180298305ff64e9f671b51d663b750ba7c8efa.tar.gz
lombok-a3180298305ff64e9f671b51d663b750ba7c8efa.tar.bz2
lombok-a3180298305ff64e9f671b51d663b750ba7c8efa.zip
[fixes #2083] adds feature ‘access level’ to `@Builder`
Diffstat (limited to 'src/core/lombok/Builder.java')
-rw-r--r--src/core/lombok/Builder.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/lombok/Builder.java b/src/core/lombok/Builder.java
index c83b3670..a60af9ee 100644
--- a/src/core/lombok/Builder.java
+++ b/src/core/lombok/Builder.java
@@ -147,6 +147,14 @@ public @interface Builder {
boolean toBuilder() default false;
/**
+ * Sets the access level of the generated builder class. By default, generated builder classes are {@code public}.
+ * Note: This does nothing if you write your own builder class (we won't change its access level).
+ *
+ * @return The builder class will be generated with this access modifier.
+ */
+ AccessLevel access() default lombok.AccessLevel.PUBLIC;
+
+ /**
* Put on a field (in case of {@code @Builder} on a type) or a parameter (for {@code @Builder} on a constructor or static method) to
* indicate how lombok should obtain a value for this field or parameter given an instance; this is only relevant if {@code toBuilder} is {@code true}.
*