static <C extends Callable<T>,T> T |
CommandLine.call(C callable,
PrintStream out,
CommandLine.Help.Ansi ansi,
String... args) |
Convenience method to allow command line application authors to avoid some boilerplate code in their application.
|
static CommandLine.Help.ColorScheme |
CommandLine.Help.defaultColorScheme(CommandLine.Help.Ansi ansi) |
Creates and returns a new CommandLine.Help.ColorScheme initialized with picocli default values: commands are bold,
options and parameters use a yellow foreground, and option parameters use italic.
|
List<Object> |
CommandLine.DefaultExceptionHandler.handleException(CommandLine.ParameterException ex,
PrintStream out,
CommandLine.Help.Ansi ansi,
String... args) |
|
List<Object> |
CommandLine.IExceptionHandler.handleException(CommandLine.ParameterException ex,
PrintStream out,
CommandLine.Help.Ansi ansi,
String... args) |
Handles a ParameterException that occurred while parsing the command
line arguments and optionally returns a list of results.
|
List<Object> |
CommandLine.IParseResultHandler.handleParseResult(List<CommandLine> parsedCommands,
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.
|
List<Object> |
CommandLine.RunAll.handleParseResult(List<CommandLine> parsedCommands,
PrintStream out,
CommandLine.Help.Ansi ansi) |
Prints help if requested, and otherwise executes the top-level command and all subcommands as Runnable
or Callable .
|
List<Object> |
CommandLine.RunFirst.handleParseResult(List<CommandLine> parsedCommands,
PrintStream out,
CommandLine.Help.Ansi ansi) |
Prints help if requested, and otherwise executes the top-level Runnable or Callable command.
|
List<Object> |
CommandLine.RunLast.handleParseResult(List<CommandLine> parsedCommands,
PrintStream out,
CommandLine.Help.Ansi ansi) |
Prints help if requested, and otherwise executes the most specific Runnable or Callable subcommand.
|
static StringBuilder |
CommandLine.Help.join(CommandLine.Help.Ansi ansi,
String[] values,
StringBuilder sb,
Object... params) |
Formats each of the specified values and appends it to the specified StringBuilder.
|
List<Object> |
CommandLine.parseWithHandlers(CommandLine.IParseResultHandler handler,
PrintStream out,
CommandLine.Help.Ansi ansi,
CommandLine.IExceptionHandler exceptionHandler,
String... args) |
Tries to parse the specified command line arguments, and if successful, delegates
the processing of the resulting list of CommandLine objects to the specified handler.
|
static boolean |
CommandLine.printHelpIfRequested(List<CommandLine> parsedCommands,
PrintStream out,
CommandLine.Help.Ansi ansi) |
Helper method that may be useful when processing the list of CommandLine objects that result from successfully
parsing command line arguments.
|
void |
CommandLine.printVersionHelp(PrintStream out,
CommandLine.Help.Ansi ansi) |
|
void |
CommandLine.printVersionHelp(PrintStream out,
CommandLine.Help.Ansi ansi,
Object... params) |
|
CommandLine.Help.Ansi.Text |
CommandLine.Help.IParamLabelRenderer.renderParameterLabel(Field field,
CommandLine.Help.Ansi ansi,
List<CommandLine.Help.Ansi.IStyle> styles) |
Returns a text rendering of the Option parameter or positional parameter; returns an empty string
"" if the option is a boolean and does not take a parameter.
|
static <R extends Runnable> void |
CommandLine.run(R runnable,
PrintStream out,
CommandLine.Help.Ansi ansi,
String... args) |
Convenience method to allow command line application authors to avoid some boilerplate code in their application.
|
void |
CommandLine.usage(PrintStream out,
CommandLine.Help.Ansi ansi) |
|
static void |
CommandLine.usage(Object command,
PrintStream out,
CommandLine.Help.Ansi ansi) |
Equivalent to new CommandLine(command).usage(out, ansi) .
|