Package picocli
Interface CommandLine.IParseResultHandler
-
- All Known Implementing Classes:
CommandLine.RunAll,CommandLine.RunFirst,CommandLine.RunLast
- Enclosing class:
- CommandLine
@Deprecated public static interface CommandLine.IParseResultHandlerDeprecated.UseCommandLine.IExecutionStrategyinstead.Represents a function that can process a List ofCommandLineobjects resulting from successfully parsing the command line arguments. This is a functional interface whose functional method ishandleParseResult(List, PrintStream, CommandLine.Help.Ansi).Implementations of this functions can be passed to the
CommandLine::parseWithHandlermethods to take some next step after the command line was successfully parsed.- Since:
- 2.0
- See Also:
CommandLine.RunFirst,CommandLine.RunLast,CommandLine.RunAll
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.util.List<java.lang.Object>handleParseResult(java.util.List<CommandLine> parsedCommands, java.io.PrintStream out, CommandLine.Help.Ansi ansi)Deprecated.Processes a List ofCommandLineobjects resulting from successfully parsing the command line arguments and optionally returns a list of results.
-
-
-
Method Detail
-
handleParseResult
java.util.List<java.lang.Object> handleParseResult(java.util.List<CommandLine> parsedCommands, java.io.PrintStream out, CommandLine.Help.Ansi ansi) throws CommandLine.ExecutionException
Deprecated.Processes a List ofCommandLineobjects resulting from successfully parsing the command line arguments and optionally returns a list of results.- Parameters:
parsedCommands- theCommandLineobjects that resulted from successfully parsing the command line argumentsout- thePrintStreamto print help to if requestedansi- for printing help messages using ANSI styles and colors- Returns:
- a list of results, or an empty list if there are no results
- 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.IExceptionHandlerCommandLine.ExecutionException- if a problem occurred while processing the parse results; useCommandLine.ExecutionException.getCommandLine()to get the command or subcommand where processing failed
-
-