Modifier and Type | Method | Description |
---|---|---|
CommandLine.ParseResult |
CommandLine.ParseResult.Builder.build() |
Creates and returns a new
ParseResult instance for this builder's configuration. |
CommandLine.ParseResult |
CommandLine.getParseResult() |
|
CommandLine.ParseResult |
CommandLine.parseArgs(String... args) |
Parses the specified command line arguments and returns a list of
ParseResult with the options, positional
parameters, and subcommands (if any) that were recognized and initialized during the parsing process. |
CommandLine.ParseResult |
CommandLine.ParseResult.subcommand() |
Returns the
ParseResult for the subcommand of this command that was matched on the command line, or null if no subcommand was matched. |
Modifier and Type | Method | Description |
---|---|---|
int |
CommandLine.AbstractParseResultHandler.execute(CommandLine.ParseResult parseResult) |
Deprecated.
|
int |
CommandLine.IExecutionStrategy.execute(CommandLine.ParseResult parseResult) |
"Executes" the user input and returns an exit code.
|
static Integer |
CommandLine.executeHelpRequest(CommandLine.ParseResult parseResult) |
Helper method that may be useful when processing the
ParseResult that results from successfully
parsing command line arguments. |
protected List<CommandLine.IExitCodeGenerator> |
CommandLine.AbstractParseResultHandler.extractExitCodeGenerators(CommandLine.ParseResult parseResult) |
Deprecated.
|
protected List<CommandLine.IExitCodeGenerator> |
CommandLine.RunAll.extractExitCodeGenerators(CommandLine.ParseResult parseResult) |
|
protected List<CommandLine.IExitCodeGenerator> |
CommandLine.RunFirst.extractExitCodeGenerators(CommandLine.ParseResult parseResult) |
|
protected List<CommandLine.IExitCodeGenerator> |
CommandLine.RunLast.extractExitCodeGenerators(CommandLine.ParseResult parseResult) |
|
protected abstract R |
CommandLine.AbstractParseResultHandler.handle(CommandLine.ParseResult parseResult) |
Deprecated.
Processes the specified
ParseResult and returns the result as a list of objects. |
protected List<Object> |
CommandLine.RunAll.handle(CommandLine.ParseResult parseResult) |
Executes the top-level command and all subcommands as
Runnable or Callable . |
protected List<Object> |
CommandLine.RunFirst.handle(CommandLine.ParseResult parseResult) |
Executes the top-level
Runnable or Callable subcommand. |
protected List<Object> |
CommandLine.RunLast.handle(CommandLine.ParseResult parseResult) |
Executes the most specific
Runnable or Callable subcommand. |
R |
CommandLine.DefaultExceptionHandler.handleExecutionException(CommandLine.ExecutionException ex,
CommandLine.ParseResult parseResult) |
Deprecated.
This implementation always simply rethrows the specified exception.
|
R |
CommandLine.IExceptionHandler2.handleExecutionException(CommandLine.ExecutionException ex,
CommandLine.ParseResult parseResult) |
Deprecated.
Handles a
ExecutionException that occurred while executing the Runnable or
Callable command and optionally returns a list of results. |
int |
CommandLine.IExecutionExceptionHandler.handleExecutionException(Exception ex,
CommandLine commandLine,
CommandLine.ParseResult parseResult) |
Handles an
Exception that occurred while executing the Runnable or
Callable command and returns an exit code suitable for returning from CommandLine.execute(String...) . |
R |
CommandLine.AbstractParseResultHandler.handleParseResult(CommandLine.ParseResult parseResult) |
Deprecated.
Prints help if requested, and otherwise calls
CommandLine.AbstractParseResultHandler.handle(CommandLine.ParseResult) . |
R |
CommandLine.IParseResultHandler2.handleParseResult(CommandLine.ParseResult parseResult) |
Deprecated.
Processes the
ParseResult object resulting from successfully
parsing the command line arguments and returns a return value. |
static boolean |
CommandLine.printHelpIfRequested(CommandLine.ParseResult parseResult) |
Delegates to
CommandLine.executeHelpRequest(ParseResult) . |
CommandLine.ParseResult.Builder |
CommandLine.ParseResult.Builder.subcommand(CommandLine.ParseResult subcommand) |
Sets the specified
ParseResult for a subcommand that was matched on the command line. |
Copyright © 2017–2019. All rights reserved.