public static interface CommandLine.IDefaultValueProvider
CommandLine.Command.defaultValueProvider()
annotation attribute.Modifier and Type | Method and Description |
---|---|
String |
defaultValue(CommandLine.Model.ArgSpec argSpec)
Returns the default value for an option or positional parameter or
null . |
String defaultValue(CommandLine.Model.ArgSpec argSpec) throws Exception
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.argSpec
- the option or positional parameter, never null
null
if
this provider has no default value for the specified option or positional parameterException
- when there was a problem obtaining the default value