CommandLine.IParseResultHandler (picocli 2.3.0 API)
Date: 2018-02-13

picocli

## Interface CommandLine.IParseResultHandler

- All Known Implementing Classes:
    CommandLine.RunAll, CommandLine.RunFirst, CommandLine.RunLast
  Enclosing class:
    CommandLine

      public static interface CommandLine.IParseResultHandler

  Represents a function that can process a List of `CommandLine` objects resulting from successfully parsing the command line arguments. This is a functional interface whose functional method is `handleParseResult(List, PrintStream, CommandLine.Help.Ansi)`.

  Implementations of this functions can be passed to the `CommandLine::parseWithHandler` methods 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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<java.lang.Object>` | `handleParseResult(java.util.List<CommandLine> parsedCommands, java.io.PrintStream out, CommandLine.Help.Ansi ansi)` Processes a List of `CommandLine` objects 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

      Processes a List of `CommandLine` objects resulting from successfully parsing the command line arguments and optionally returns a list of results.
      Parameters:
        `parsedCommands` - the `CommandLine` objects that resulted from successfully parsing the command line arguments
        `out` - the `PrintStream` to print help to if requested
        `ansi` - 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.ExecutionException` - if a problem occurred while processing the parse results; use `CommandLine.ExecutionException.getCommandLine()` to get the command or subcommand where processing failed