Interface ConfigSpec.CorrectionListener
- Enclosing class:
- ConfigSpec
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Listens to the corrections made by the methods
ConfigSpec.correct(Config) and
ConfigSpec.correct(Config, CorrectionListener).-
Method Summary
-
Method Details
-
onCorrect
void onCorrect(ConfigSpec.CorrectionAction action, List<String> path, Object incorrectValue, Object correctedValue) Called when a config value is added, modified or removed by the correction.- Parameters:
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.
-