R
- the return type of this handlerCommandLine.IExecutionStrategy
instead, see CommandLine.execute(String...)
@Deprecated public static interface CommandLine.IParseResultHandler2<R>
ParseResult
object resulting from successfully
parsing the command line arguments. This is a
functional interface
whose functional method is handleParseResult(CommandLine.ParseResult)
.
Implementations of this function can be passed to the CommandLine::parseWithHandlers
methods to take some next step after the command line was successfully parsed.
This interface replaces the CommandLine.IParseResultHandler
interface; it takes the parse result as a ParseResult
object instead of a List of CommandLine
objects, and it has the freedom to select the CommandLine.Help.Ansi
style
to use and what PrintStreams
to print to.
CommandLine.RunFirst
,
CommandLine.RunLast
,
CommandLine.RunAll
Modifier and Type | Method and Description |
---|---|
R |
handleParseResult(CommandLine.ParseResult parseResult)
Deprecated.
Processes the
ParseResult object resulting from successfully
parsing the command line arguments and returns a return value. |
R handleParseResult(CommandLine.ParseResult parseResult) throws CommandLine.ExecutionException
ParseResult
object resulting from successfully
parsing the command line arguments and returns a return value.parseResult
- the ParseResult
that resulted from successfully parsing the command line argumentsCommandLine.ParameterException
- if a help command was invoked for an unknown subcommand. Any ParameterExceptions
thrown from this method are treated as if this exception was thrown during parsing and passed to the CommandLine.IExceptionHandler2
CommandLine.ExecutionException
- if a problem occurred while processing the parse results; use
CommandLine.ExecutionException.getCommandLine()
to get the command or subcommand where processing failed