-
Notifications
You must be signed in to change notification settings - Fork 445
Closed
Milestone
Description
Add support for IDefaultValueProvider on @Command and potentially on individual @Option and @Parameters.
See discussion under #261.
Proposed API:
interface IDefaultValueProvider {
/** Returns the default value for an option or positional parameter or {@code 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.
* @param argSpec the option or positional parameter, never {@code null}
* @return the default value for the option or positional parameter, or {@code null} if
* this provider has no default value for the specified option or positional parameter
*/
String defaultValue(ArgSpec argSpec);
}NicolasMassartNicolasMassartNicolasMassart