Class CLIProcessor
java.lang.Object
gov.nist.secauto.metaschema.cli.processor.CLIProcessor
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final org.apache.commons.cli.Optionstatic final org.apache.commons.cli.Optionstatic final List<org.apache.commons.cli.Option>static final org.apache.commons.cli.Optionstatic final org.apache.commons.cli.Optionstatic final org.apache.commons.cli.Option -
Constructor Summary
ConstructorsConstructorDescriptionCLIProcessor(String exec) CLIProcessor(String exec, Map<String, IVersionInfo> versionInfos) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommandHandler(ICommand handler) getExec()Gets the command used to execute for use in help text.Retrieve the version information for this application.static voidstatic voidProcess a set of CLIProcessor arguments.protected void
-
Field Details
-
HELP_OPTION
@NonNull public static final org.apache.commons.cli.Option HELP_OPTION -
NO_COLOR_OPTION
@NonNull public static final org.apache.commons.cli.Option NO_COLOR_OPTION -
QUIET_OPTION
@NonNull public static final org.apache.commons.cli.Option QUIET_OPTION -
SHOW_STACK_TRACE_OPTION
@NonNull public static final org.apache.commons.cli.Option SHOW_STACK_TRACE_OPTION -
VERSION_OPTION
@NonNull public static final org.apache.commons.cli.Option VERSION_OPTION -
OPTIONS
-
COMMAND_VERSION
- See Also:
-
-
Constructor Details
-
CLIProcessor
-
CLIProcessor
-
-
Method Details
-
main
-
getExec
Gets the command used to execute for use in help text.- Returns:
- the command name
-
getVersionInfos
Retrieve the version information for this application.- Returns:
- the versionInfo
-
addCommandHandler
-
process
Process a set of CLIProcessor arguments.process().getExitCode().getStatusCode()
- Parameters:
args- the arguments to process- Returns:
- the exit status
-
getTopLevelCommands
-
handleQuiet
public static void handleQuiet() -
showVersion
protected void showVersion()
-