Package software.amazon.smithy.cli
Class StandardOptions
java.lang.Object
software.amazon.smithy.cli.StandardOptions
- All Implemented Interfaces:
 ArgumentReceiver
Options available to all commands.
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleandebug()booleanhelp()logging()booleanquiet()voidregisterHelp(HelpPrinter printer) Registers help information to the givenHelpPrinter.booleanbooleantestOption(String name) Test if the given value-less option is accepted by the receiver.testParameter(String name) Test if the given parameter that requires a value is accepted by the receiver. 
- 
Field Details
- 
HELP_SHORT
- See Also:
 
 - 
HELP
- See Also:
 
 - 
DEBUG
- See Also:
 
 - 
QUIET
- See Also:
 
 - 
STACKTRACE
- See Also:
 
 - 
NO_COLOR
- See Also:
 
 - 
FORCE_COLOR
- See Also:
 
 - 
LOGGING
- See Also:
 
 
 - 
 - 
Constructor Details
- 
StandardOptions
public StandardOptions() 
 - 
 - 
Method Details
- 
registerHelp
Description copied from interface:ArgumentReceiverRegisters help information to the givenHelpPrinter.- Specified by:
 registerHelpin interfaceArgumentReceiver- Parameters:
 printer- Printer to modify.
 - 
testOption
Description copied from interface:ArgumentReceiverTest if the given value-less option is accepted by the receiver.If the option is accepted, the receiver should store a stateful value to indicate the option was received, and the CLI will skip the argument for further processing.
- Specified by:
 testOptionin interfaceArgumentReceiver- Parameters:
 name- Name of the option to test.- Returns:
 - Returns true if accepted.
 
 - 
testParameter
Description copied from interface:ArgumentReceiverTest if the given parameter that requires a value is accepted by the receiver.If the parameter is accepted, the receiver returns a Consumer that receives the expected value, and it should store a stateful value to allow the value to be later recalled. The CLI will skip the argument for further processing.
- Specified by:
 testParameterin interfaceArgumentReceiver- Parameters:
 name- Name of the parameter to test.- Returns:
 - Returns a consumer if accepted or null if rejected.
 
 - 
help
public boolean help() - 
logging
 - 
quiet
public boolean quiet() - 
debug
public boolean debug() - 
stackTrace
public boolean stackTrace() - 
colorSetting
 
 -