static <C extends java.util.concurrent.Callable<T>,T> T |
CommandLine.call(C callable,
java.io.PrintStream out,
CommandLine.Help.Ansi ansi,
java.lang.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.
|
java.util.List<java.lang.Object> |
CommandLine.DefaultExceptionHandler.handleException(CommandLine.ParameterException ex,
java.io.PrintStream out,
CommandLine.Help.Ansi ansi,
java.lang.String... args) |
|
java.util.List<java.lang.Object> |
CommandLine.IExceptionHandler.handleException(CommandLine.ParameterException ex,
java.io.PrintStream out,
CommandLine.Help.Ansi ansi,
java.lang.String... args) |
Handles a ParameterException that occurred while parsing the command
line arguments and optionally returns a list of results.
|
java.util.List<java.lang.Object> |
CommandLine.IParseResultHandler.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.
|
java.util.List<java.lang.Object> |
CommandLine.RunAll.handleParseResult(java.util.List<CommandLine> parsedCommands,
java.io.PrintStream out,
CommandLine.Help.Ansi ansi) |
Prints help if requested, and otherwise executes the top-level command and all subcommands as Runnable
or Callable .
|
java.util.List<java.lang.Object> |
CommandLine.RunFirst.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.
|
java.util.List<java.lang.Object> |
CommandLine.RunLast.handleParseResult(java.util.List<CommandLine> parsedCommands,
java.io.PrintStream out,
CommandLine.Help.Ansi ansi) |
Prints help if requested, and otherwise executes the most specific Runnable or Callable subcommand.
|
private static java.lang.String |
CommandLine.Help.heading(CommandLine.Help.Ansi ansi,
java.lang.String values,
java.lang.Object... params) |
|
static java.lang.StringBuilder |
CommandLine.Help.join(CommandLine.Help.Ansi ansi,
java.lang.String[] values,
java.lang.StringBuilder sb,
java.lang.Object... params) |
Formats each of the specified values and appends it to the specified StringBuilder.
|
java.util.List<java.lang.Object> |
CommandLine.parseWithHandlers(CommandLine.IParseResultHandler handler,
java.io.PrintStream out,
CommandLine.Help.Ansi ansi,
CommandLine.IExceptionHandler exceptionHandler,
java.lang.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(java.util.List<CommandLine> parsedCommands,
java.io.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(java.io.PrintStream out,
CommandLine.Help.Ansi ansi) |
|
void |
CommandLine.printVersionHelp(java.io.PrintStream out,
CommandLine.Help.Ansi ansi,
java.lang.Object... params) |
|
CommandLine.Help.Ansi.Text |
CommandLine.Help.DefaultParamLabelRenderer.renderParameterLabel(java.lang.reflect.Field field,
CommandLine.Help.Ansi ansi,
java.util.List<CommandLine.Help.Ansi.IStyle> styles) |
|
CommandLine.Help.Ansi.Text |
CommandLine.Help.IParamLabelRenderer.renderParameterLabel(java.lang.reflect.Field field,
CommandLine.Help.Ansi ansi,
java.util.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 java.lang.Runnable> void |
CommandLine.run(R runnable,
java.io.PrintStream out,
CommandLine.Help.Ansi ansi,
java.lang.String... args) |
Convenience method to allow command line application authors to avoid some boilerplate code in their application.
|
void |
CommandLine.usage(java.io.PrintStream out,
CommandLine.Help.Ansi ansi) |
|
static void |
CommandLine.usage(java.lang.Object command,
java.io.PrintStream out,
CommandLine.Help.Ansi ansi) |
Equivalent to new CommandLine(command).usage(out, ansi) .
|