onValue

fun onValue(callback: (T) -> Unit): OptionBuilder<T>(source)

Registers a callback to be executed when this option's value is found during parsing. The callback receives the converted value and is executed after all parsing and validation completes. Callbacks are executed in the order their values appear on the command line.