Package nz.org.riskscape.picocli
Interface CommandLine.IParseResultHandler2<R>
- Type Parameters:
R- the return type of this handler
- All Known Implementing Classes:
CommandLine.AbstractParseResultHandler,CommandLine.RunAll,CommandLine.RunFirst,CommandLine.RunLast
- Enclosing class:
- CommandLine
Deprecated.
Represents a function that can process the 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.
-
Method Summary
Modifier and TypeMethodDescriptionhandleParseResult(CommandLine.ParseResult parseResult) Deprecated.Processes theParseResultobject resulting from successfully parsing the command line arguments and returns a return value.
-
Method Details
-
handleParseResult
Deprecated.Processes theParseResultobject resulting from successfully parsing the command line arguments and returns a return value.- Parameters:
parseResult- theParseResultthat resulted from successfully parsing the command line arguments- Throws:
CommandLine.ParameterException- if a help command was invoked for an unknown subcommand. AnyParameterExceptionsthrown from this method are treated as if this exception was thrown during parsing and passed to theCommandLine.IExceptionHandler2CommandLine.ExecutionException- if a problem occurred while processing the parse results; useCommandLine.ExecutionException.getCommandLine()to get the command or subcommand where processing failed
-
CommandLine.IExecutionStrategyinstead, seeCommandLine.execute(String...)