From d680f8c7f48b6a982c2cea0e8758716eee4807bc Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sun, 22 Dec 2013 04:40:54 +0100 Subject: [configuration] initial batch of configuration keys, primarily for flag usages. --- src/core/lombok/extern/slf4j/Slf4j.java | 10 ++++++++++ src/core/lombok/extern/slf4j/XSlf4j.java | 9 +++++++++ 2 files changed, 19 insertions(+) (limited to 'src/core/lombok/extern/slf4j') diff --git a/src/core/lombok/extern/slf4j/Slf4j.java b/src/core/lombok/extern/slf4j/Slf4j.java index 45942971..b79735f3 100644 --- a/src/core/lombok/extern/slf4j/Slf4j.java +++ b/src/core/lombok/extern/slf4j/Slf4j.java @@ -25,6 +25,9 @@ import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; + +import lombok.core.FlagUsageType; +import lombok.core.configuration.ConfigurationKey; /** * Causes lombok to generate a logger field. *

@@ -56,4 +59,11 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface Slf4j { + /** + * lombok configuration: {@code lombok.log.slf4j.flagUsage} = {@code WARNING} | {@code ERROR}. + * + * If set, any usage of {@code @Slf4j} results in a warning / error. + */ + ConfigurationKey FLAG_USAGE = new ConfigurationKey("lombok.log.slf4j.flagUsage") {}; } + diff --git a/src/core/lombok/extern/slf4j/XSlf4j.java b/src/core/lombok/extern/slf4j/XSlf4j.java index 599c68ab..a9e193c1 100644 --- a/src/core/lombok/extern/slf4j/XSlf4j.java +++ b/src/core/lombok/extern/slf4j/XSlf4j.java @@ -25,6 +25,9 @@ import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; + +import lombok.core.FlagUsageType; +import lombok.core.configuration.ConfigurationKey; /** * Causes lombok to generate a logger field. *

@@ -57,4 +60,10 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface XSlf4j { + /** + * lombok configuration: {@code lombok.log.xslf4j.flagUsage} = {@code WARNING} | {@code ERROR}. + * + * If set, any usage of {@code @XSlf4j} results in a warning / error. + */ + ConfigurationKey FLAG_USAGE = new ConfigurationKey("lombok.log.xslf4j.flagUsage") {}; } -- cgit