aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/RequiredArgsConstructor.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok/RequiredArgsConstructor.java')
-rw-r--r--src/core/lombok/RequiredArgsConstructor.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/lombok/RequiredArgsConstructor.java b/src/core/lombok/RequiredArgsConstructor.java
index 31c4b81d..03f4e40e 100644
--- a/src/core/lombok/RequiredArgsConstructor.java
+++ b/src/core/lombok/RequiredArgsConstructor.java
@@ -26,6 +26,9 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import lombok.core.FlagUsageType;
+import lombok.core.configuration.ConfigurationKey;
+
/**
* Generates a constructor with required arguments.
* Required arguments are final fields and fields with constraints such as {@code @NonNull}.
@@ -41,6 +44,13 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.SOURCE)
public @interface RequiredArgsConstructor {
/**
+ * lombok configuration: {@code lombok.RequiredArgsConstructor.flagUsage} = {@code WARNING} | {@code ERROR}.
+ *
+ * If set, <em>any</em> usage of {@code @RequiredArgsConstructor} results in a warning / error.
+ */
+ ConfigurationKey<FlagUsageType> FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.RequiredArgsConstructor.flagUsage") {};
+
+ /**
* If set, the generated constructor will be private, and an additional static 'constructor'
* is generated with the same argument list that wraps the real constructor.
*