- call(C, PrintStream, String...) - Static method in class picocli.CommandLine
-
- call(C, PrintStream, CommandLine.Help.Ansi, String...) - Static method in class picocli.CommandLine
-
Convenience method to allow command line application authors to avoid some boilerplate code in their application.
- cellAt(int, int) - Method in class picocli.CommandLine.Help.TextTable
-
- clone() - Method in class picocli.CommandLine.Help.Ansi.Text
-
- colorScheme - Variable in class picocli.CommandLine.Help.Layout
-
- column - Variable in class picocli.CommandLine.Help.TextTable.Cell
-
Table column index (zero based).
- columns - Variable in class picocli.CommandLine.Help.TextTable
-
The column definitions of this table.
- columnValues - Variable in class picocli.CommandLine.Help.TextTable
-
The char[]
slots of the TextTable
to copy text values into.
- COMMAND_LINE - Static variable in class picocli.groovy.PicocliBaseScript
-
Name of the property that holds the CommandLine instance for this script ("commandLine").
- CommandLine - Class in picocli
-
CommandLine interpreter that uses reflection to initialize an annotated domain object with values obtained from the
command line arguments.
- CommandLine(Object) - Constructor for class picocli.CommandLine
-
Constructs a new CommandLine
interpreter with the specified annotated object and a default subcommand factory.
- CommandLine(Object, CommandLine.IFactory) - Constructor for class picocli.CommandLine
-
Constructs a new CommandLine
interpreter with the specified annotated object and object factory.
- CommandLine.Command - Annotation Type in picocli
-
Annotate your class with @Command
when you want more control over the format of the generated help
message.
- CommandLine.DefaultExceptionHandler - Class in picocli
-
Default exception handler that prints the exception message to the specified PrintStream
, followed by the
usage message for the command or subcommand whose input was invalid.
- CommandLine.DefaultExceptionHandler() - Constructor for class picocli.CommandLine.DefaultExceptionHandler
-
- CommandLine.DuplicateOptionAnnotationsException - Exception in picocli
-
Exception indicating that multiple fields have been annotated with the same Option name.
- CommandLine.DuplicateOptionAnnotationsException(String) - Constructor for exception picocli.CommandLine.DuplicateOptionAnnotationsException
-
- CommandLine.ExecutionException - Exception in picocli
-
Exception indicating a problem while invoking a command or subcommand.
- CommandLine.ExecutionException(CommandLine, String) - Constructor for exception picocli.CommandLine.ExecutionException
-
- CommandLine.ExecutionException(CommandLine, String, Exception) - Constructor for exception picocli.CommandLine.ExecutionException
-
- CommandLine.Help - Class in picocli
-
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.
- CommandLine.Help(Object) - Constructor for class picocli.CommandLine.Help
-
Constructs a new Help
instance with a default color scheme, initialized from annotatations
on the specified class and superclasses.
- CommandLine.Help(Object, CommandLine.Help.Ansi) - Constructor for class picocli.CommandLine.Help
-
Constructs a new Help
instance with a default color scheme, initialized from annotatations
on the specified class and superclasses.
- CommandLine.Help(Object, CommandLine.Help.ColorScheme) - Constructor for class picocli.CommandLine.Help
-
Constructs a new Help
instance with the specified color scheme, initialized from annotatations
on the specified class and superclasses.
- CommandLine.Help.Ansi - Enum in picocli
-
Provides methods and inner classes to support using ANSI escape codes in usage help messages.
- CommandLine.Help.Ansi.IStyle - Interface in picocli
-
Defines the interface for an ANSI escape sequence.
- CommandLine.Help.Ansi.Style - Enum in picocli
-
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.
- CommandLine.Help.Ansi.Text - Class in picocli
-
Encapsulates rich text with styles and colors.
- CommandLine.Help.Ansi.Text(int) - Constructor for class picocli.CommandLine.Help.Ansi.Text
-
Constructs a Text with the specified max length (for use in a TextTable Column).
- CommandLine.Help.Ansi.Text(String) - Constructor for class picocli.CommandLine.Help.Ansi.Text
-
Constructs a Text with the specified String, which may contain markup like
@|bg(red),white,underline some text|@
.
- CommandLine.Help.ColorScheme - Class in picocli
-
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.
- CommandLine.Help.ColorScheme() - Constructor for class picocli.CommandLine.Help.ColorScheme
-
- CommandLine.Help.ColorScheme(CommandLine.Help.Ansi) - Constructor for class picocli.CommandLine.Help.ColorScheme
-
Constructs a new ColorScheme with the specified Ansi enabled mode.
- CommandLine.Help.Column - Class in picocli
-
Columns define the width, indent (leading number of spaces in a column before the value) and
Overflow policy of a column in a
TextTable.
- CommandLine.Help.Column(int, int, CommandLine.Help.Column.Overflow) - Constructor for class picocli.CommandLine.Help.Column
-
- CommandLine.Help.Column.Overflow - Enum in picocli
-
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.
- CommandLine.Help.IOptionRenderer - Interface in picocli
-
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.
- CommandLine.Help.IParameterRenderer - Interface in picocli
-
When customizing online help for
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.
- CommandLine.Help.IParamLabelRenderer - Interface in picocli
-
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.
- CommandLine.Help.Layout - Class in picocli
-
Use a Layout to format usage help text for options and parameters in tabular format.
- CommandLine.Help.Layout(CommandLine.Help.ColorScheme) - Constructor for class picocli.CommandLine.Help.Layout
-
- CommandLine.Help.Layout(CommandLine.Help.ColorScheme, CommandLine.Help.TextTable) - Constructor for class picocli.CommandLine.Help.Layout
-
- CommandLine.Help.Layout(CommandLine.Help.ColorScheme, CommandLine.Help.TextTable, CommandLine.Help.IOptionRenderer, CommandLine.Help.IParameterRenderer) - Constructor for class picocli.CommandLine.Help.Layout
-
Constructs a Layout with the specified color scheme, the specified TextTable, the
specified option renderer and the specified parameter renderer.
- CommandLine.Help.TextTable - Class in picocli
-
- CommandLine.Help.TextTable(CommandLine.Help.Ansi) - Constructor for class picocli.CommandLine.Help.TextTable
-
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)
- CommandLine.Help.TextTable(CommandLine.Help.Ansi, int...) - Constructor for class picocli.CommandLine.Help.TextTable
-
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.
- CommandLine.Help.TextTable(CommandLine.Help.Ansi, CommandLine.Help.Column...) - Constructor for class picocli.CommandLine.Help.TextTable
-
Constructs a TextTable
with the specified columns.
- CommandLine.Help.TextTable.Cell - Class in picocli
-
Helper class to index positions in a Help.TextTable
.
- CommandLine.Help.TextTable.Cell(int, int) - Constructor for class picocli.CommandLine.Help.TextTable.Cell
-
Constructs a new Cell with the specified coordinates in the table.
- CommandLine.IExceptionHandler - Interface in picocli
-
Represents a function that can handle a
ParameterException
that occurred while
parsing the command line arguments.
- CommandLine.IFactory - Interface in picocli
-
- CommandLine.InitializationException - Exception in picocli
-
Exception indicating a problem during CommandLine
initialization.
- CommandLine.InitializationException(String) - Constructor for exception picocli.CommandLine.InitializationException
-
- CommandLine.InitializationException(String, Exception) - Constructor for exception picocli.CommandLine.InitializationException
-
- CommandLine.IParseResultHandler - Interface in picocli
-
Represents a function that can process a List of
CommandLine
objects resulting from successfully
parsing the command line arguments.
- CommandLine.ITypeConverter<K> - Interface in picocli
-
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.
- CommandLine.IVersionProvider - Interface in picocli
-
Provides version information for a command.
- CommandLine.MaxValuesforFieldExceededException - Exception in picocli
-
Exception indicating that more values were specified for an option or parameter than its
arity
allows.
- CommandLine.MaxValuesforFieldExceededException(CommandLine, String) - Constructor for exception picocli.CommandLine.MaxValuesforFieldExceededException
-
- CommandLine.MissingParameterException - Exception in picocli
-
Exception indicating that a required parameter was not specified.
- CommandLine.MissingParameterException(CommandLine, String) - Constructor for exception picocli.CommandLine.MissingParameterException
-
- CommandLine.MissingTypeConverterException - Exception in picocli
-
- CommandLine.MissingTypeConverterException(CommandLine, String) - Constructor for exception picocli.CommandLine.MissingTypeConverterException
-
- CommandLine.Option - Annotation Type in picocli
-
Annotate fields in your class with @Option
and picocli will initialize these fields when matching
arguments are specified on the command line.
- CommandLine.OverwrittenOptionException - Exception in picocli
-
Exception indicating that an option for a single-value option field has been specified multiple times on the command line.
- CommandLine.OverwrittenOptionException(CommandLine, String) - Constructor for exception picocli.CommandLine.OverwrittenOptionException
-
- CommandLine.ParameterException - Exception in picocli
-
Exception indicating something went wrong while parsing command line options.
- CommandLine.ParameterException(CommandLine, String) - Constructor for exception picocli.CommandLine.ParameterException
-
Constructs a new ParameterException with the specified CommandLine and error message.
- CommandLine.ParameterException(CommandLine, String, Exception) - Constructor for exception picocli.CommandLine.ParameterException
-
Constructs a new ParameterException with the specified CommandLine and error message.
- CommandLine.ParameterIndexGapException - Exception in picocli
-
- CommandLine.ParameterIndexGapException(String) - Constructor for exception picocli.CommandLine.ParameterIndexGapException
-
- CommandLine.Parameters - Annotation Type in picocli
-
Fields annotated with @Parameters
will be initialized with positional parameters.
- CommandLine.ParentCommand - Annotation Type in picocli
-
Fields annotated with @ParentCommand
will be initialized with the parent command of the current subcommand.
- CommandLine.PicocliException - Exception in picocli
-
Base class of all exceptions thrown by picocli.CommandLine
.
- CommandLine.PicocliException(String) - Constructor for exception picocli.CommandLine.PicocliException
-
- CommandLine.PicocliException(String, Exception) - Constructor for exception picocli.CommandLine.PicocliException
-
- CommandLine.Range - Class in picocli
-
Describes the number of parameters required and accepted by an option or a positional parameter.
- CommandLine.Range(int, int, boolean, boolean, String) - Constructor for class picocli.CommandLine.Range
-
Constructs a new Range object with the specified parameters.
- CommandLine.RunAll - Class in picocli
-
Command line parse result handler that prints help if requested, and otherwise executes the top-level command and
all subcommands as Runnable
or Callable
.
- CommandLine.RunAll() - Constructor for class picocli.CommandLine.RunAll
-
- CommandLine.RunFirst - Class in picocli
-
Command line parse result handler that prints help if requested, and otherwise executes the top-level
Runnable
or Callable
command.
- CommandLine.RunFirst() - Constructor for class picocli.CommandLine.RunFirst
-
- CommandLine.RunLast - Class in picocli
-
Command line parse result handler that prints help if requested, and otherwise executes the most specific
Runnable
or Callable
subcommand.
- CommandLine.RunLast() - Constructor for class picocli.CommandLine.RunLast
-
- CommandLine.TypeConversionException - Exception in picocli
-
- CommandLine.TypeConversionException(String) - Constructor for exception picocli.CommandLine.TypeConversionException
-
- CommandLine.UnmatchedArgumentException - Exception in picocli
-
- CommandLine.UnmatchedArgumentException(CommandLine, String) - Constructor for exception picocli.CommandLine.UnmatchedArgumentException
-
- CommandLine.UnmatchedArgumentException(CommandLine, Stack<String>) - Constructor for exception picocli.CommandLine.UnmatchedArgumentException
-
- CommandLine.UnmatchedArgumentException(CommandLine, List<String>) - Constructor for exception picocli.CommandLine.UnmatchedArgumentException
-
- commandList() - Method in class picocli.CommandLine.Help
-
Returns a 2-column list with command names and the first line of their header or (if absent) description.
- commandListHeading - Variable in class picocli.CommandLine.Help
-
Optional heading preceding the subcommand list.
- commandListHeading(Object...) - Method in class picocli.CommandLine.Help
-
Returns the text displayed before the command list; an empty string if there are no commands,
otherwise the result of String.format(commandListHeading, params)
.
- commandName - Variable in class picocli.CommandLine.Help
-
The String to use as the program name in the synopsis line of the help message.
- commands(CommandLine.Help.Ansi.IStyle...) - Method in class picocli.CommandLine.Help.ColorScheme
-
Adds the specified styles to the registered styles for commands in this color scheme and returns this color scheme.
- commandStyles - Variable in class picocli.CommandLine.Help.ColorScheme
-
- commandText(String) - Method in class picocli.CommandLine.Help.ColorScheme
-
Returns a Text with all command styles applied to the specified command string.
- compareTo(CommandLine.Range) - Method in class picocli.CommandLine.Range
-
- contains(int) - Method in class picocli.CommandLine.Range
-
Returns true
if this Range includes the specified value, false
otherwise.
- convert(String) - Method in interface picocli.CommandLine.ITypeConverter
-
Converts the specified command line argument value to some domain object.
- create(Class<K>) - Method in interface picocli.CommandLine.IFactory
-
Creates and returns an instance of the specified class.
- createCommandLine() - Method in class picocli.groovy.PicocliBaseScript
-
Create and returns a new CommandLine instance.
- createDefaultLayout() - Method in class picocli.CommandLine.Help
-
Returns a Layout
instance configured with the user preferences captured in this Help instance.
- createDefaultOptionRenderer() - Method in class picocli.CommandLine.Help
-
Returns a new default OptionRenderer which converts
Options
to five columns of text to match
the default
TextTable column layout.
- createDefaultParameterRenderer() - Method in class picocli.CommandLine.Help
-
Returns a new default ParameterRenderer which converts
Parameters
to four columns of
text to match the default
TextTable column layout.
- createDefaultParamLabelRenderer() - Method in class picocli.CommandLine.Help
-
Returns a new default value renderer that separates option parameters from their
options with the specified separator string, surrounds optional parameters with
'['
and
']'
characters and uses ellipses ("...") to indicate that any number of a parameter are allowed.
- createMinimalOptionRenderer() - Static method in class picocli.CommandLine.Help
-
Returns a new minimal OptionRenderer which converts
Options
to a single row with two columns
of text: an option name and a description.
- createMinimalParameterRenderer() - Static method in class picocli.CommandLine.Help
-
Returns a new minimal ParameterRenderer which converts
Parameters
to a single row with
two columns of text: an option name and a description.
- createMinimalParamLabelRenderer() - Static method in class picocli.CommandLine.Help
-
Returns a value renderer that returns the paramLabel
if defined or the field name otherwise.
- createShortOptionArityAndNameComparator() - Static method in class picocli.CommandLine.Help
-
- createShortOptionNameComparator() - Static method in class picocli.CommandLine.Help
-
Sorts Fields annotated with Option
by their option name in case-insensitive alphabetic order.
- CSI - Static variable in interface picocli.CommandLine.Help.Ansi.IStyle
-
The Control Sequence Introducer (CSI) escape sequence "\u001b[".
- customSynopsis - Variable in class picocli.CommandLine.Help
-
Optional custom synopsis lines to use instead of the auto-generated synopsis.
- customSynopsis(Object...) - Method in class picocli.CommandLine.Help
-
Returns command custom synopsis as a string.
- parameterArity(Field) - Static method in class picocli.CommandLine.Range
-
Returns a new
Range
based on the
CommandLine.Parameters.arity()
annotation on the specified field,
or the field type's default arity if no arity was specified.
- parameterIndex(Field) - Static method in class picocli.CommandLine.Range
-
- parameterLabelRenderer - Variable in class picocli.CommandLine.Help
-
Option and positional parameter value label renderer used for the synopsis line(s) and the option list.
- parameterList() - Method in class picocli.CommandLine.Help
-
Returns the section of the usage help message that lists the parameters with their descriptions.
- parameterList(CommandLine.Help.Layout, CommandLine.Help.IParamLabelRenderer) - Method in class picocli.CommandLine.Help
-
Returns the section of the usage help message that lists the parameters with their descriptions.
- parameterListHeading - Variable in class picocli.CommandLine.Help
-
Optional heading preceding the parameter list.
- parameterListHeading(Object...) - Method in class picocli.CommandLine.Help
-
Returns the text displayed before the positional parameter list; an empty string if there are no positional
parameters, otherwise the result of String.format(parameterListHeading, params)
.
- parameterRenderer - Variable in class picocli.CommandLine.Help.Layout
-
- parameters(CommandLine.Help.Ansi.IStyle...) - Method in class picocli.CommandLine.Help.ColorScheme
-
Adds the specified styles to the registered styles for positional parameters in this color scheme and returns this color scheme.
- parameterStyles - Variable in class picocli.CommandLine.Help.ColorScheme
-
- parameterText(String) - Method in class picocli.CommandLine.Help.ColorScheme
-
Returns a Text with all parameter styles applied to the specified parameter string.
- parse(String) - Static method in enum picocli.CommandLine.Help.Ansi.Style
-
Parses the specified comma-separated sequence of style descriptors and returns the associated
styles.
- parse(String...) - Method in class picocli.CommandLine
-
Parses the specified command line arguments and returns a list of CommandLine
objects representing the
top-level command and any subcommands (if any) that were recognized and initialized during the parsing process.
- parseScriptArguments(CommandLine, String[]) - Method in class picocli.groovy.PicocliBaseScript
-
- parseWithHandler(CommandLine.IParseResultHandler, PrintStream, String...) - Method in class picocli.CommandLine
-
- parseWithHandlers(CommandLine.IParseResultHandler, PrintStream, CommandLine.Help.Ansi, CommandLine.IExceptionHandler, String...) - Method in class picocli.CommandLine
-
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.
- picocli - package picocli
-
- picocli.groovy - package picocli.groovy
-
Provides classes and annotations to give Groovy scripts convenient access to picocli functionality.
- PicocliBaseScript - Class in picocli.groovy
-
Base script class that provides picocli declarative (annotation-based) command line argument processing for Groovy scripts.
- PicocliBaseScript() - Constructor for class picocli.groovy.PicocliBaseScript
-
- PicocliScript - Annotation Type in picocli.groovy
-
Annotation to give Groovy scripts convenient access to picocli functionality.
- PicocliScriptASTTransformation - Class in picocli.groovy
-
- PicocliScriptASTTransformation() - Constructor for class picocli.groovy.PicocliScriptASTTransformation
-
- plainString() - Method in class picocli.CommandLine.Help.Ansi.Text
-
Returns the plain text without any formatting.
- populateCommand(T, String...) - Static method in class picocli.CommandLine
-
Convenience method that initializes the specified annotated object from the specified command line arguments.
- positionalParametersFields - Variable in class picocli.CommandLine.Help
-
- printErrorMessage(String) - Method in class picocli.groovy.PicocliBaseScript
-
Error messages that arise from command line processing call this.
- printHelpIfRequested(List<CommandLine>, PrintStream, CommandLine.Help.Ansi) - Static method in class picocli.CommandLine
-
Helper method that may be useful when processing the list of
CommandLine
objects that result from successfully
parsing command line arguments.
- printHelpMessage(CommandLine) - Method in class picocli.groovy.PicocliBaseScript
-
If an @Option whose usageHelp
attribute is annotated as true appears in the arguments.
- printVersionHelp(PrintStream) - Method in class picocli.CommandLine
-
- printVersionHelp(PrintStream, CommandLine.Help.Ansi) - Method in class picocli.CommandLine
-
- printVersionHelp(PrintStream, CommandLine.Help.Ansi, Object...) - Method in class picocli.CommandLine
-
- printVersionHelpMessage(CommandLine) - Method in class picocli.groovy.PicocliBaseScript
-
If an @Option whose versionHelp
attribute is annotated as true appears in the arguments.
- putValue(int, int, CommandLine.Help.Ansi.Text) - Method in class picocli.CommandLine.Help.TextTable
-
Writes the specified value into the cell at the specified row and column and returns the last row and
column written to.
- separator() - Method in interface picocli.CommandLine.Help.IParamLabelRenderer
-
Returns the separator between option name and param label.
- separator - Variable in class picocli.CommandLine.Help
-
The String to use as the separator between options and option parameters.
- setCommandName(String) - Method in class picocli.CommandLine
-
Sets the command name (also called program name) displayed in the usage help synopsis to the specified value.
- setExpandAtFiles(boolean) - Method in class picocli.CommandLine
-
Sets whether arguments starting with '@'
should be treated as the path to an argument file and its
contents should be expanded into separate arguments for each line in the specified file.
- setOverwrittenOptionsAllowed(boolean) - Method in class picocli.CommandLine
-
- setSeparator(String) - Method in class picocli.CommandLine
-
Sets the String the parser uses to separate option names from option values to the specified value.
- setStopAtPositional(boolean) - Method in class picocli.CommandLine
-
Sets whether the parser interprets the first positional parameter as "end of options" so the remaining
arguments are all treated as positional parameters.
- setStopAtUnmatched(boolean) - Method in class picocli.CommandLine
-
Sets whether the parser should stop interpreting options and positional parameters as soon as it encounters an
unmatched option.
- setUnmatchedArgumentsAllowed(boolean) - Method in class picocli.CommandLine
-
- shortestFirst() - Static method in class picocli.CommandLine.Help
-
Sorts short strings before longer strings.
- showDefaultValues - Variable in class picocli.CommandLine.Help
-
If true
, the options list will show default values for all options except booleans.
- sortOptions - Variable in class picocli.CommandLine.Help
-
If true
, the options list is sorted alphabetically.
- splitLines() - Method in class picocli.CommandLine.Help.Ansi.Text
-
- substring(int) - Method in class picocli.CommandLine.Help.Ansi.Text
-
Returns a new Text
instance that is a substring of this Text.
- substring(int, int) - Method in class picocli.CommandLine.Help.Ansi.Text
-
Returns a new Text
instance that is a substring of this Text.
- synopsis() - Method in class picocli.CommandLine.Help
-
- synopsis(int) - Method in class picocli.CommandLine.Help
-
Returns a synopsis for the command, reserving the specified space for the synopsis heading.
- synopsisHeading - Variable in class picocli.CommandLine.Help
-
Optional heading preceding the synopsis.
- synopsisHeading(Object...) - Method in class picocli.CommandLine.Help
-
Returns the text displayed before the synopsis text; the result of String.format(synopsisHeading, params)
.
- synopsisHeadingLength() - Method in class picocli.CommandLine.Help
-
Returns the number of characters the synopsis heading will take on the same line as the synopsis.