From a3180298305ff64e9f671b51d663b750ba7c8efa Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Wed, 1 May 2019 00:41:32 +0200 Subject: [fixes #2083] adds feature ‘access level’ to `@Builder` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/lombok/Builder.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/lombok/Builder.java') 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 @@ -146,6 +146,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}. -- cgit