public ConfigAware extends Config
| Modifier and Type | Interface and Description |
|---|---|
static class |
ConfigAware.DefaultImpls |
Config.Companion| Modifier and Type | Method and Description |
|---|---|
boolean |
getActive()
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.
|
boolean |
getAutoCorrect()
Does this rule have auto correct specified in configuration?
For auto correction to work the rule set itself enable it.
|
Config |
getConfig()
Wrapped configuration of the ruleSet this rule is in.
|
java.lang.String |
getId()
Id which is used to retrieve the sub config for this rule.
|
Config |
subConfig(java.lang.String key)
Tries to retrieve part of the configuration based on given key.
|
<T> T |
valueOrDefault(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.
|
<T> T |
valueOrNull(java.lang.String key)
Retrieves a sub configuration or value based on given key.
If the configuration property cannot be found, null is returned.
|
void |
withAutoCorrect(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.
|
subConfig, valueOrDefault, valueOrNulljava.lang.String getId()
Id which is used to retrieve the sub config for this rule.
Config getConfig()
Wrapped configuration of the ruleSet this rule is in.
void withAutoCorrect(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.
boolean getAutoCorrect()
Does this rule have auto correct specified in configuration? For auto correction to work the rule set itself enable it.
boolean getActive()
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.
Config subConfig(java.lang.String key)
Tries to retrieve part of the configuration based on given key.
<T> T valueOrDefault(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.
<T> T valueOrNull(java.lang.String key)
Retrieves a sub configuration or value based on given key. If the configuration property cannot be found, null is returned.