public static class ConfigAware.DefaultImpls
| Modifier and Type | Method and Description |
|---|---|
static boolean |
getActive(ConfigAware $this)
Is this rule specified as active in configuration?
If an rule is not specified in the underlying configuration, we assume it should not be run.
|
static boolean |
getAutoCorrect(ConfigAware $this)
Does this rule have auto correct specified in configuration?
For auto correction to work the rule set itself enable it.
|
static Config |
subConfig(ConfigAware $this,
java.lang.String key)
Tries to retrieve part of the configuration based on given key.
|
static <T> T |
valueOrDefault(ConfigAware $this,
java.lang.String key,
T p)
Retrieves a sub configuration or value based on given key. If configuration property cannot be found
the specified default value is returned.
|
static <T> T |
valueOrNull(ConfigAware $this,
java.lang.String key)
Retrieves a sub configuration or value based on given key.
If the configuration property cannot be found, null is returned.
|
static void |
withAutoCorrect(ConfigAware $this,
kotlin.jvm.functions.Function0<kotlin.Unit> block)
If your rule supports to automatically correct the misbehaviour of underlying smell,
specify your code inside this method call, to allow the user of your rule to trigger auto correction
only when needed.
|
public static void withAutoCorrect(ConfigAware $this, kotlin.jvm.functions.Function0<kotlin.Unit> block)
If your rule supports to automatically correct the misbehaviour of underlying smell, specify your code inside this method call, to allow the user of your rule to trigger auto correction only when needed.
public static boolean getAutoCorrect(ConfigAware $this)
Does this rule have auto correct specified in configuration? For auto correction to work the rule set itself enable it.
public static boolean getActive(ConfigAware $this)
Is this rule specified as active in configuration? If an rule is not specified in the underlying configuration, we assume it should not be run.
public static Config subConfig(ConfigAware $this, java.lang.String key)
Tries to retrieve part of the configuration based on given key.
public static <T> T valueOrDefault(ConfigAware $this, java.lang.String key, T p)
Retrieves a sub configuration or value based on given key. If configuration property cannot be found the specified default value is returned.
public static <T> T valueOrNull(ConfigAware $this, java.lang.String key)
Retrieves a sub configuration or value based on given key. If the configuration property cannot be found, null is returned.