@FunctionalInterface
public static interface ConfigSpec.CorrectionListener
ConfigSpec.correct(Config) and
ConfigSpec.correct(Config, CorrectionListener).| Modifier and Type | Method and Description |
|---|---|
void |
onCorrect(ConfigSpec.CorrectionAction action,
java.util.List<java.lang.String> path,
java.lang.Object incorrectValue,
java.lang.Object correctedValue)
Called when a config value is added, modified or removed by the correction.
|
void onCorrect(ConfigSpec.CorrectionAction action, java.util.List<java.lang.String> path, java.lang.Object incorrectValue, java.lang.Object correctedValue)
action - the action that was taken.path - the path of the value, unmodifiable.incorrectValue - the old, incorrect value. May be null if the value didn't exist
before the correction, or if the value was actually null.correctedValue - the new, corrected value. May be null if the value has been
removed by the correction, or if the default value in the
specification is null.