diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-12-22 04:40:54 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2014-01-18 18:55:52 +0100 |
commit | d680f8c7f48b6a982c2cea0e8758716eee4807bc (patch) | |
tree | 7b4465ecd8c07bec61402f1f65e9b4ff550a51e2 /src/core/lombok/Data.java | |
parent | f6eef8e50a9cde3643541c077bd138230ff5b96a (diff) | |
download | lombok-d680f8c7f48b6a982c2cea0e8758716eee4807bc.tar.gz lombok-d680f8c7f48b6a982c2cea0e8758716eee4807bc.tar.bz2 lombok-d680f8c7f48b6a982c2cea0e8758716eee4807bc.zip |
[configuration] initial batch of configuration keys, primarily for flag usages.
Diffstat (limited to 'src/core/lombok/Data.java')
-rw-r--r-- | src/core/lombok/Data.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/lombok/Data.java b/src/core/lombok/Data.java index bbc8d920..46703461 100644 --- a/src/core/lombok/Data.java +++ b/src/core/lombok/Data.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 getters for all fields, a useful toString method, and hashCode and equals implementations that check * all non-transient fields. Will also generate setters for all non-final fields, as well as a constructor. @@ -45,6 +48,13 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) public @interface Data { /** + * lombok configuration: {@code lombok.Data.flagUsage} = {@code WARNING} | {@code ERROR}. + * + * If set, <em>any</em> usage of {@code @Data} results in a warning / error. + */ + ConfigurationKey<FlagUsageType> FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Data.flagUsage") {}; + + /** * If you specify a static constructor name, then the generated constructor will be private, and * instead a static factory method is created that other classes can use to create instances. * We suggest the name: "of", like so: |