mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 08:18:29 +00:00
[configuration] Make sure the ConfigurationKeys class is initialized
This commit is contained in:
1 parent
5767628efe
commit
513a27f746
3 files changed
+17
-2
No files matched your search
@@ -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") {};
|
||||
}
|
||||
@@ -56,7 +56,7 @@ import org.eclipse.jdt.internal.compiler.ast.TypeReference;
|
||||
*/
|
||||
public class HandlerLibrary {
|
||||
static {
|
||||
ConfigurationKeys.class.getClass();
|
||||
ConfigurationKeys.ensureKeysLoaded();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user