Package io.github.qishr.cascara.common.util
Interface IDefaultValueProvider
java.lang.Object
io.github.qishr.cascara.common.util.CommandLine.IDefaultValueProvider
Enclosing Class:
io.github.qishr.cascara.common.util.CommandLine
All Known Implementing Classes:
PropertiesDefaultProvider
public static interface IDefaultValueProvider
Provides default value for a command.Commands may configure a provider with the Command#defaultValueProvider() annotation attribute.
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| public abstract String | defaultValue(ArgSpec argSpec) | Returns the default value for an option or positional parameter or null. |
Method Details
defaultValue
public abstract String defaultValue(ArgSpec argSpec)
Returns the default value for an option or positional parameter or null.The returned value is converted to the type of the option/positional parameter
via the same type converter used when populating this option/positional
parameter from a command line argument.
Parameters:
argSpec - the option or positional parameter, never null
Returns:
the default value for the option or positional parameter, or null if
this provider has no default value for the specified option or positional parameter
Throws: