All Classes and Interfaces
Class
Description
Stand-alone tool that generates bash auto-complete scripts for picocli-based command line applications.
CLI command class for generating completion script.
Drops all characters that are not valid for bash function and identifier names.
Command that generates a Bash/ZSH completion script for its top-level command.
CommandLine interpreter that uses reflection to initialize an annotated user object with values obtained from the
command line arguments.
Deprecated.
Deprecated.
A
Command
may define one or more ArgGroups
: a group of options, positional parameters or a mixture of the two.Utility class providing some defensive coding convenience methods.
Inner class to group the built-in
CommandLine.ITypeConverter
implementations.Converts
"true"
or "false"
to a Boolean
.Converts text to a
Byte
by delegating to Byte.valueOf(String)
.Converts text to a
InetAddress
by delegating to InetAddress.getByName(String)
.Converts text to an
Integer
by delegating to Integer.valueOf(String)
.Converts text in
yyyy-mm-dd
format to a java.util.Date
.Converts text in any of the following formats to a
java.sql.Time
: HH:mm
, HH:mm:ss
,
HH:mm:ss.SSS
, HH:mm:ss,SSS
.Converts text to a
Long
by delegating to Long.valueOf(String)
.Converts text to a
Short
by delegating to Short.valueOf(String)
.Extends StringWriter to use ColorScheme.
Annotate your class with
@Command
when you want more control over the format of the generated help
message.Uses cosine similarity to find matches from a candidate set for a specified input.
Deprecated.
Exception indicating that multiple named elements have incorrectly used the same name.
Exception indicating that multiple fields have been annotated with the same Option name.
Exception indicating a problem while invoking a command or subcommand.
Defines some exit codes used by picocli as default return values from the
execute
and executeHelpRequest
methods.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.
Builder class to create
ColorScheme
instances.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 converts positional parameters to five columns of text to match the
default TextTable column layout.
DefaultParamLabelRenderer separates option parameters from their option names with a
separator string, and, unless
CommandLine.Model.ArgSpec.hideParamSyntax()
is true, surrounds optional values with '['
and ']'
characters
and uses ellipses ("...") to indicate that any number of values is allowed for options or parameters with variable arity.When customizing online help for
Option
details, a custom IOptionRenderer
can 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 for positional parameters details, a custom
IParameterRenderer
can 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 custom
IParamLabelRenderer
can 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 converts
Options
to a single row with two columns of text: an
option name and a description.The MinimalParameterRenderer converts positional parameters to a single row with two columns of
text: the parameters label and a description.
Sorts short strings before longer strings.
Sorts
OptionSpec
instances by their max arity first, then their min arity, then delegates to super class.Sorts
OptionSpec
instances by their name in case-insensitive alphabetic order.Responsible for spacing out
CommandLine.Help.Ansi.Text
values according to the CommandLine.Help.Column
definitions the table was
created with.Helper class to index positions in a
Help.TextTable
.Controls the visibility of certain aspects of the usage help message.
Help command that can be installed as a subcommand on all application commands.
Provides default value for a command.
Deprecated.
Deprecated.
Classes implementing this interface know how to handle Exceptions that occurred while executing the
Runnable
, Callable
or Method
user object of the command.Implementations are responsible for "executing" the user input and returning an exit code.
Interface that provides the appropriate exit code that will be returned from the
execute
method for an exception that occurred during parsing or while invoking the command's Runnable, Callable, or Method.@Command
-annotated classes can implement this interface to specify an exit code that will be returned
from the execute
method when the command is successfully invoked.Factory for instantiating classes that are registered declaratively with annotation attributes, like
CommandLine.Command.subcommands()
, CommandLine.Option.converter()
, CommandLine.Parameters.converter()
and CommandLine.Command.versionProvider()
.Deprecated.
use
CommandLine.IHelpCommandInitializable2
insteadHelp commands that provide usage help for other commands can implement this interface to be initialized with the information they need.
Creates the
CommandLine.Help
instance used to render the usage help message.Renders a section of the usage help message.
Provides a way to modify how the command model is built.
Determines the option name transformation of negatable boolean options.
Exception indicating a problem during
CommandLine
initialization.Options or positional parameters can be assigned a
IParameterConsumer
that implements
custom logic to process the parameters for this option or this position.Classes implementing this interface know how to handle
ParameterExceptions
(usually from invalid user input).Options, positional parameters and commands can be assigned a
IParameterPreprocessor
that
implements custom logic to preprocess the parameters for this option, position or command.Deprecated.
Use
CommandLine.IExecutionStrategy
instead.Deprecated.
use
CommandLine.IExecutionStrategy
instead, see CommandLine.execute(String...)
When parsing command line arguments and initializing
fields annotated with
@Option
or @Parameters
,
String values can be converted to any type for which a ITypeConverter
is registered.Provides version information for a command.
Exception indicating that more values were specified for an option or parameter than its
arity
allows.Exception indicating that a required parameter was not specified.
Exception indicating that an annotated field had a type for which no
CommandLine.ITypeConverter
was
registered.
Fields annotated with
@Mixin
are "expanded" into the current command: @Option
and
@Parameters
in the mixin class are added to the options and positional parameters of this command.This class provides a namespace for classes and interfaces that model concepts and attributes of command line interfaces in picocli.
The
ArgGroupSpec
class models a group
of arguments (options, positional parameters or a mixture of the two).Builder responsible for creating valid
ArgGroupSpec
objects.Models the shared attributes of
CommandLine.Model.OptionSpec
and CommandLine.Model.PositionalParamSpec
.This class provides a case-aware Linked HashMap.
The
CommandSpec
class models a command specification, including the options, positional parameters and subcommands
supported by the command, as well as attributes for the version help message and the usage help message of the command.Internal interface to allow annotation processors to construct a command model at compile time.
Interface to allow extending the capabilities of other interface without Java 8 default methods.
Customizable getter for obtaining the current value of an option or positional parameter.
The scope of a getter/setter binding is the context where the current value should be gotten from or set to.
This interface provides access to an
CommandLine.Model.IScope
instance.Customizable setter for modifying the value of an option or positional parameter.
Encapculates type information for an option or parameter to make this information available both at runtime
and at compile time (when
Class
values are not available).Utility class for getting resource bundle strings.
Command method parameter, similar to java.lang.reflect.Parameter (not available before Java 8).
The
OptionSpec
class models aspects of a named option of a command, including whether
it is required or optional, the option parameters supported (or required) by the option,
and attributes for the usage help message describing the option.Builder responsible for creating valid
OptionSpec
objects.Models parser configuration specification.
The
PositionalParamSpec
class models aspects of a positional parameter of a command, including whether
it is required or optional, and attributes for the usage help message describing the positional parameter.Builder responsible for creating valid
PositionalParamSpec
objects.This class allows applications to specify a custom binding that will be invoked for unmatched arguments.
Models the usage help message specification and can be used to customize the usage help message.
Exception indicating that the user input included multiple arguments from a mutually exclusive group.
Annotate fields in your class with
@Option
and 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 with
CommandLine.Parameters
.
Fields annotated with
@Parameters
will be initialized with positional parameters.
Fields annotated with
@ParentCommand
will be initialized with the parent command of the current subcommand.Encapsulates the result of parsing an array of command line arguments.
Builds immutable
ParseResult
instances.A group's multiplicity specifies how many matches of a group may
appear on the command line.
Provides information about an
CommandLine.ArgGroup
that was matched on the command line.Base class of all exceptions thrown by
picocli.CommandLine
.IDefaultValueProvider
implementation that loads default values for command line
options and positional parameters from a properties file or Properties
object.Describes the number of parameters required and accepted by an option or a positional parameter.
A regular expression-based option name transformation for negatable options.
Builder for creating
RegexTransformer
objects.Command line execution strategy that prints help if requested, and otherwise executes the top-level command and
all subcommands as
Runnable
, Callable
or Method
.Command line execution strategy that prints help if requested, and otherwise executes the top-level
Runnable
or Callable
command.Command line execution strategy that prints help if requested, and otherwise executes the most specific
Runnable
or Callable
subcommand.Specifies the scope of the element.
Fields annotated with
@Spec
will be initialized with the CommandSpec
for the command the field is part of.Identifies what kind of
CommandSpec
should be injected.Enumerates over the trace level values for filtering which internal debug statements should be printed.
Utility class for printing internal debug statements.
Exception thrown by
CommandLine.ITypeConverter
implementations to indicate a String could not be converted.Fields annotated with
@Unmatched
will be initialized with the list of unmatched command line arguments, if any.Exception indicating that a command line argument could not be mapped to any of the fields annotated with
CommandLine.Option
or CommandLine.Parameters
.Converter that can be used to signal to picocli that it should use the default converter.
CommandLine.execute(String...)