Package org.apache.logging.log4j.core.tools.picocli
package org.apache.logging.log4j.core.tools.picocli
-
ClassDescriptionCommandLine interpreter that uses reflection to initialize an annotated domain object with values obtained from the command line arguments.Utility class providing some defensive coding convenience methods.Inner class to group the built-in
CommandLine.ITypeConverterimplementations.Converts"true"or"false"to aBoolean.Converts text to aByteby delegating toByte.valueOf(String).Converts text to aInetAddressby delegating toInetAddress.getByName(String).Converts text to anIntegerby delegating toInteger.valueOf(String).Converts text inyyyy-mm-ddformat to ajava.util.Date.Converts text in any of the following formats to ajava.sql.Time:HH:mm,HH:mm:ss,HH:mm:ss.SSS,HH:mm:ss,SSS.Converts text to aLongby delegating toLong.valueOf(String).Converts text to aShortby delegating toShort.valueOf(String).Annotate your class with@Commandwhen you want more control over the format of the generated help message.Default exception handler that prints the exception message to the specifiedPrintStream, followed by the usage message for the command or subcommand whose input was invalid.Exception indicating that multiple fields have been annotated with the same Option name.Exception indicating a problem while invoking a command or subcommand.A collection of methods and inner classes that provide fine-grained control over the contents and layout of the usage help message to display to end users when help is requested or invalid input values were specified.Provides methods and inner classes to support using ANSI escape codes in usage help messages.Defines the interface for an ANSI escape sequence.Defines a palette map of 216 colors: 6 * 6 * 6 cube (216 colors): 16 + 36 * r + 6 * g + b (0 <= r, g, b <= 5).A set of pre-defined ANSI escape code styles and colors, and a set of convenience methods for parsing text with embedded markup style names, as well as convenience methods for converting styles to strings with embedded escape codes.All usage help message are generated with a color scheme that assigns certain styles and colors to common parts of a usage message: the command name, options, positional parameters and option parameters.Policy for handling text that is longer than the column width: span multiple columns, wrap to the next row, or simply truncate the portion that doesn't fit.The DefaultParameterRenderer convertsParametersto five columns of text to match the default TextTable column layout.When customizing online help forOptiondetails, a customIOptionRenderercan be used to create textual representation of an Option in a tabular format: one or more rows, each containing one or more columns.When customizing online help forParametersdetails, a customIParameterRenderercan be used to create textual representation of a Parameters field in a tabular format: one or more rows, each containing one or more columns.When customizing online usage help for an option parameter or a positional parameter, a customIParamLabelRenderercan be used to render the parameter name or label to a String.Use a Layout to format usage help text for options and parameters in tabular format.The MinimalOptionRenderer convertsOptionsto a single row with two columns of text: an option name and a description.The MinimalParameterRenderer convertsParametersto a single row with two columns of text: the parameters label and a description.Sorts short strings before longer strings.SortsOptioninstances by their max arity first, then their min arity, then delegates to super class.SortsOptioninstances by their name in case-insensitive alphabetic order.Responsible for spacing outCommandLine.Help.Ansi.Textvalues according to theCommandLine.Help.Columndefinitions the table was created with.Helper class to index positions in aHelp.TextTable.Represents a function that can handle aParameterExceptionthat occurred while parsing the command line arguments.Exception indicating a problem duringCommandLineinitialization.Represents a function that can process a List ofCommandLineobjects resulting from successfully parsing the command line arguments.When parsing command line arguments and initializing fields annotated with@Optionor@Parameters, String values can be converted to any type for which aITypeConverteris registered.Exception indicating that more values were specified for an option or parameter than itsarityallows.Exception indicating that a required parameter was not specified.Exception indicating that an annotated field had a type for which noCommandLine.ITypeConverterwas registered.Annotate fields in your class with@Optionand picocli will initialize these fields when matching arguments are specified on the command line.Exception indicating that an option for a single-value option field has been specified multiple times on the command line.Exception indicating something went wrong while parsing command line options.Exception indicating that there was a gap in the indices of the fields annotated withCommandLine.Parameters.Fields annotated with@Parameterswill be initialized with positional parameters.Base class of all exceptions thrown bypicocli.CommandLine.Describes the number of parameters required and accepted by an option or a positional parameter.Command line parse result handler that prints help if requested, and otherwise executes the top-level command and all subcommands asRunnableorCallable.Command line parse result handler that prints help if requested, and otherwise executes the top-levelRunnableorCallablecommand.Command line parse result handler that prints help if requested, and otherwise executes the most specificRunnableorCallablesubcommand.Exception thrown byCommandLine.ITypeConverterimplementations to indicate a String could not be converted.Exception indicating that a command line argument could not be mapped to any of the fields annotated withCommandLine.OptionorCommandLine.Parameters.