Package | Description |
---|---|
org.apache.logging.log4j.core.tools.picocli |
Modifier and Type | Field and Description |
---|---|
private CommandLine.Help.Ansi |
CommandLine.Help.TextTable.ansi |
private CommandLine.Help.Ansi |
CommandLine.Help.ColorScheme.ansi |
Modifier and Type | Method and Description |
---|---|
CommandLine.Help.Ansi |
CommandLine.Help.ansi()
Returns whether ANSI escape codes are enabled or not.
|
CommandLine.Help.Ansi |
CommandLine.Help.ColorScheme.ansi() |
static CommandLine.Help.Ansi |
CommandLine.Help.Ansi.valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CommandLine.Help.Ansi[] |
CommandLine.Help.Ansi.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
static <C extends java.util.concurrent.Callable<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.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.DefaultExceptionHandler.handleException(CommandLine.ParameterException ex,
java.io.PrintStream out,
CommandLine.Help.Ansi ansi,
java.lang.String... args) |
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.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. |
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 . |
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)
|
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)
Prints version information from the
CommandLine.Command.version() annotation to the specified PrintStream . |
void |
CommandLine.printVersionHelp(java.io.PrintStream out,
CommandLine.Help.Ansi ansi,
java.lang.Object... params)
Prints version information from the
CommandLine.Command.version() annotation to the specified PrintStream . |
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. |
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) |
static <R extends java.lang.Runnable> |
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.
|
static void |
CommandLine.usage(java.lang.Object command,
java.io.PrintStream out,
CommandLine.Help.Ansi ansi)
Equivalent to
new CommandLine(command).usage(out, ansi) . |
void |
CommandLine.usage(java.io.PrintStream out,
CommandLine.Help.Ansi ansi)
Delegates to
CommandLine.usage(PrintStream, Help.ColorScheme) with the default color scheme. |
Constructor and Description |
---|
ColorScheme(CommandLine.Help.Ansi ansi)
Constructs a new ColorScheme with the specified Ansi enabled mode.
|
Help(java.lang.Object command,
CommandLine.Help.Ansi ansi)
Constructs a new
Help instance with a default color scheme, initialized from annotatations
on the specified class and superclasses. |
TextTable(CommandLine.Help.Ansi ansi)
Constructs a TextTable with five columns as follows:
required option/parameter marker (width: 2, indent: 0, TRUNCATE on overflow)
short option name (width: 2, indent: 0, TRUNCATE on overflow)
comma separator (width: 1, indent: 0, TRUNCATE on overflow)
long option name(s) (width: 24, indent: 1, SPAN multiple columns on overflow)
description line(s) (width: 51, indent: 1, WRAP to next row on overflow)
|
TextTable(CommandLine.Help.Ansi ansi,
CommandLine.Help.Column... columns)
Constructs a
TextTable with the specified columns. |
TextTable(CommandLine.Help.Ansi ansi,
int... columnWidths)
Constructs a new TextTable with columns with the specified width, all SPANning multiple columns on
overflow except the last column which WRAPS to the next row.
|