public static class CommandLine.RunFirst extends java.lang.Object implements CommandLine.IParseResultHandler
Runnable or Callable command.
For use in the parseWithHandler methods.
From picocli v2.0, RunFirst is used to implement the run
and call convenience methods.
| Constructor and Description |
|---|
CommandLine.RunFirst() |
| 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)
Prints help if requested, and otherwise executes the top-level
Runnable or Callable command. |
public java.util.List<java.lang.Object> handleParseResult(java.util.List<CommandLine> parsedCommands, java.io.PrintStream out, CommandLine.Help.Ansi ansi)
Runnable or Callable command.
If the top-level command does not implement either Runnable or Callable, a ExecutionException
is thrown detailing the problem and capturing the offending CommandLine object.handleParseResult in interface CommandLine.IParseResultHandlerparsedCommands - the CommandLine objects that resulted from successfully parsing the command line argumentsout - the PrintStream to print help to if requestedansi - for printing help messages using ANSI styles and colorsCallable, or a null element if the top-level command was a RunnableCommandLine.ExecutionException - if a problem occurred while processing the parse results; use
CommandLine.ExecutionException.getCommandLine() to get the command or subcommand where processing failed