Package 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 public static interface CommandLine.IParseResultHandler2<R>
Deprecated.useCommandLine.IExecutionStrategy
instead, seeCommandLine.execute(String...)
Represents a function that can process theParseResult
object resulting from successfully parsing the command line arguments. This is a functional interface whose functional method ishandleParseResult(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 aParseResult
object instead of a List ofCommandLine
objects, and it has the freedom to select theCommandLine.Help.Ansi
style to use and whatPrintStreams
to print to.- Since:
- 3.0
- See Also:
CommandLine.RunFirst
,CommandLine.RunLast
,CommandLine.RunAll
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description R
handleParseResult(CommandLine.ParseResult parseResult)
Deprecated.Processes theParseResult
object resulting from successfully parsing the command line arguments and returns a return value.
-
-
-
Method Detail
-
handleParseResult
R handleParseResult(CommandLine.ParseResult parseResult) throws CommandLine.ExecutionException
Deprecated.Processes theParseResult
object resulting from successfully parsing the command line arguments and returns a return value.- Parameters:
parseResult
- theParseResult
that resulted from successfully parsing the command line arguments- Throws:
CommandLine.ParameterException
- if a help command was invoked for an unknown subcommand. AnyParameterExceptions
thrown from this method are treated as if this exception was thrown during parsing and passed to theCommandLine.IExceptionHandler2
CommandLine.ExecutionException
- if a problem occurred while processing the parse results; useCommandLine.ExecutionException.getCommandLine()
to get the command or subcommand where processing failed
-
-