[configuration] Make sure the ConfigurationKeys class is initialized

This commit is contained in:
Roel Spilker committed 2014-01-19 02:23:14 +01:00
1 parent 5767628efe
commit 513a27f746
3 files changed
+17 -2

No files matched your search

+15
View File
@@ -30,6 +30,11 @@ import lombok.core.configuration.ConfigurationKey;
public class ConfigurationKeys {
private ConfigurationKeys() {}
/**
* Makes sure all {@link ConfigurationKey}s in this class are loaded.
*/
public static void ensureKeysLoaded() {};
// ##### main package features #####
// ----- *ArgsConstructor -----
@@ -297,4 +302,14 @@ public class ConfigurationKeys {
* If set, <em>any</em> usage of {@code @Value} results in a warning / error.
*/
public static final ConfigurationKey<FlagUsageType> WITHER_FLAG_USAGE = new ConfigurationKey<FlagUsageType>("lombok.Wither.flagUsage") {};
/**
* lombok configuration: {@code stop-bubbling} = {@code true} | {@code false}.
*
* If not set, or set to {@code false}, the configuration system will look for {@code lombok.config} files in the parent directory.
*
* If set to {@code true}, no futher {@code lombok.config} files will be checked.
*/
public static final ConfigurationKey<Boolean> STOP_BUBBLING = new ConfigurationKey<Boolean>("stop-bubbling") {};
}
+1 -1
View File
@@ -56,7 +56,7 @@ import org.eclipse.jdt.internal.compiler.ast.TypeReference;
*/
public class HandlerLibrary {
static {
ConfigurationKeys.class.getClass();
ConfigurationKeys.ensureKeysLoaded();
}
/**
+1 -1
View File
@@ -55,7 +55,7 @@ import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
*/
public class HandlerLibrary {
static {
ConfigurationKeys.class.getClass();
ConfigurationKeys.ensureKeysLoaded();
}
private final TypeLibrary typeLibrary = new TypeLibrary();