Package nz.org.riskscape.picocli
Interface CommandLine.Model.ISetter
- All Known Subinterfaces:
CommandLine.Model.IScope
- Enclosing class:
- CommandLine.Model
public static interface CommandLine.Model.ISetter
Customizable setter for modifying the value of an option or positional parameter.
When an option or positional parameter is matched on the command line, its setter is invoked to capture the value.
For example, an option can be bound to a field or a method, and when the option is matched on the command line, the
field's value is set or the method is invoked with the option parameter value.
- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescription<T> T
set
(T value) Sets the new value of the option or positional parameter.
-
Method Details
-
set
Sets the new value of the option or positional parameter.- Type Parameters:
T
- type of the value- Parameters:
value
- the new value of the option or positional parameter- Returns:
- the previous value of the binding (if supported by this binding)
- Throws:
CommandLine.PicocliException
- if a problem occurred while setting the new valueException
- internally, picocli call sites will catch any exceptions thrown from here and rethrow them wrapped in a PicocliException
-