## Uses of Class
picocli.CommandLine

- Packages that use CommandLine
  Package | Description
  --- | ---
  picocli | Provides classes and interfaces for the main picocli command line parsing and `autocompletion` functionality.
  picocli.groovy | Provides classes and annotations to give Groovy scripts convenient access to picocli functionality.

- - ### Uses of CommandLine in picocli

    Methods in picocli that return CommandLine
    Modifier and Type | Method and Description
    --- | ---
    `CommandLine` | CommandLine.`addMixin(String name, Object mixin)` Adds the options and positional parameters in the specified mixin to this command.
    `CommandLine` | CommandLine.`addSubcommand(String name, Object command)` Registers a subcommand with the specified name.
    `CommandLine` | CommandLine.`addSubcommand(String name, Object command, String... aliases)` Registers a subcommand with the specified name and all specified aliases.
    `CommandLine` | CommandLine.Model.CommandSpec.`commandLine()` Returns the CommandLine constructed with this `CommandSpec` model.
    `CommandLine` | CommandLine.ExecutionException.`getCommandLine()` Returns the `CommandLine` object for the (sub)command that could not be invoked.
    `CommandLine` | CommandLine.ParameterException.`getCommandLine()` Returns the `CommandLine` object for the (sub)command whose input could not be parsed.
    `CommandLine` | CommandLine.`getParent()` Returns the command that this is a subcommand of, or `null` if this is a top-level command.
    `<K> CommandLine` | CommandLine.`registerConverter(Class<K> cls, CommandLine.ITypeConverter<K> converter)` Registers the specified type converter for the specified class.
    `CommandLine` | CommandLine.`setAtFileCommentChar(Character atFileCommentChar)` Sets the character that starts a single-line comment or `null` if all content of argument files should be interpreted as arguments (without comments).
    `CommandLine` | CommandLine.`setCaseInsensitiveEnumValuesAllowed(boolean newValue)` Sets whether the parser should ignore case when converting arguments to `enum` values.
    `CommandLine` | CommandLine.`setCommandName(String commandName)` Sets the command name (also called program name) displayed in the usage help synopsis to the specified value.
    `CommandLine` | CommandLine.`setDefaultValueProvider(CommandLine.IDefaultValueProvider newValue)` Sets a default value provider for the command and sub-commands
    `CommandLine` | CommandLine.`setEndOfOptionsDelimiter(String delimiter)` Sets the end-of-options delimiter that signals that the remaining command line arguments should be treated as positional parameters.
    `CommandLine` | CommandLine.`setExpandAtFiles(boolean expandAtFiles)` 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.
    `CommandLine` | CommandLine.`setHelpFactory(CommandLine.IHelpFactory helpFactory)` Sets a new `IHelpFactory` to customize the usage help message.
    `CommandLine` | CommandLine.`setHelpSectionKeys(List<String> keys)` Sets the section keys in the order that the usage help message should render the sections.
    `CommandLine` | CommandLine.`setHelpSectionMap(Map<String,CommandLine.IHelpSectionRenderer> map)` Sets the map of section keys and renderers used to construct the usage help message.
    `CommandLine` | CommandLine.`setOverwrittenOptionsAllowed(boolean newValue)` Sets whether options for single-value fields can be specified multiple times on the command line without a `CommandLine.OverwrittenOptionException` being thrown.
    `CommandLine` | CommandLine.`setPosixClusteredShortOptionsAllowed(boolean newValue)` Sets whether short options like `-x -v -f SomeFile` can be clustered together like `-xvfSomeFile`.
    `CommandLine` | CommandLine.`setResourceBundle(ResourceBundle bundle)` Sets the ResourceBundle containing usage help message strings.
    `CommandLine` | CommandLine.`setSeparator(String separator)` Sets the String the parser uses to separate option names from option values to the specified value.
    `CommandLine` | CommandLine.`setSplitQuotedStrings(boolean newValue)` Sets whether the parser is allowed to split quoted Strings.
    `CommandLine` | CommandLine.`setStopAtPositional(boolean newValue)` Sets whether the parser interprets the first positional parameter as "end of options" so the remaining arguments are all treated as positional parameters.
    `CommandLine` | CommandLine.`setStopAtUnmatched(boolean newValue)` Sets whether the parser should stop interpreting options and positional parameters as soon as it encounters an unmatched option.
    `CommandLine` | CommandLine.`setToggleBooleanFlags(boolean newValue)` Sets whether the value of boolean flag options should be "toggled" when the option is matched.
    `CommandLine` | CommandLine.`setTrimQuotes(boolean newValue)` Sets whether the parser should trim quotes from command line arguments before processing them.
    `CommandLine` | CommandLine.`setUnmatchedArgumentsAllowed(boolean newValue)` Sets whether the end user may specify unmatched arguments on the command line without a `CommandLine.UnmatchedArgumentException` being thrown.
    `CommandLine` | CommandLine.`setUnmatchedOptionsArePositionalParams(boolean newValue)` Sets whether arguments on the command line that resemble an option should be treated as positional parameters.
    `CommandLine` | CommandLine.`setUsageHelpWidth(int width)` Sets the maximum width of the usage help message.
    `CommandLine` | CommandLine.`setUseSimplifiedAtFiles(boolean simplifiedAtFiles)` Sets whether to use a simplified argument file format that is compatible with JCommander.

    Methods in picocli that return types with arguments of type CommandLine
    Modifier and Type | Method and Description
    --- | ---
    `List<CommandLine>` | CommandLine.ParseResult.`asCommandLineList()` Returns this `ParseResult` as a list of `CommandLine` objects, one for each matched command/subcommand.
    `Map<String,CommandLine>` | CommandLine.`getSubcommands()` Returns a map with the subcommands registered on this instance.
    `List<CommandLine>` | CommandLine.`parse(String... args)` 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.
    `Map<String,CommandLine>` | CommandLine.Model.CommandSpec.`subcommands()` Returns a read-only view of the subcommand map.

    Methods in picocli with parameters of type CommandLine
    Modifier and Type | Method and Description
    --- | ---
    `CommandLine.Model.CommandSpec` | CommandLine.Model.CommandSpec.`addSubcommand(String name, CommandLine subCommandLine)` Adds the specified subcommand with the specified name.
    `static String` | AutoComplete.`bash(String scriptName, CommandLine commandLine)` Generates and returns the source code for an autocompletion bash script for the specified picocli-based application.
    `static void` | AutoComplete.`bash(String scriptName, File out, File command, CommandLine commandLine)` Generates source code for an autocompletion bash script for the specified picocli-based application, and writes this script to the specified `out` file, and optionally writes an invocation script to the specified `command` file.
    `protected CommandLine.Model.CommandSpec` | CommandLine.Model.CommandSpec.`commandLine(CommandLine commandLine)` Sets the CommandLine constructed with this `CommandSpec` model.
    `void` | CommandLine.HelpCommand.`init(CommandLine helpCommandLine, CommandLine.Help.Ansi ansi, PrintStream out, PrintStream err)` Initializes this object with the information needed to implement a help command that provides usage help for other commands.
    `void` | CommandLine.IHelpCommandInitializable.`init(CommandLine helpCommandLine, CommandLine.Help.Ansi ansi, PrintStream out, PrintStream err)` Initializes this object with the information needed to implement a help command that provides usage help for other commands.
    `<T> T` | CommandLine.Model.ArgSpec.`setValue(T newValue, CommandLine commandLine)` Deprecated. use `CommandLine.Model.ArgSpec.setValue(Object)` instead. This was a design mistake.

    Method parameters in picocli with type arguments of type CommandLine
    Modifier and Type | Method and Description
    --- | ---
    `CommandLine.Help` | CommandLine.Help.`addAllSubcommands(Map<String,CommandLine> commands)` Registers all specified subcommands with this Help.
    `List<Object>` | CommandLine.IParseResultHandler.`handleParseResult(List<CommandLine> parsedCommands, PrintStream out, CommandLine.Help.Ansi ansi)` Deprecated. Processes a List of `CommandLine` objects resulting from successfully parsing the command line arguments and optionally returns a list of results.
    `List<Object>` | CommandLine.RunFirst.`handleParseResult(List<CommandLine> parsedCommands, PrintStream out, CommandLine.Help.Ansi ansi)` Prints help if requested, and otherwise executes the top-level `Runnable` or `Callable` command.
    `List<Object>` | CommandLine.RunLast.`handleParseResult(List<CommandLine> parsedCommands, PrintStream out, CommandLine.Help.Ansi ansi)` Prints help if requested, and otherwise executes the most specific `Runnable` or `Callable` subcommand.
    `List<Object>` | CommandLine.RunAll.`handleParseResult(List<CommandLine> parsedCommands, PrintStream out, CommandLine.Help.Ansi ansi)` Prints help if requested, and otherwise executes the top-level command and all subcommands as `Runnable` or `Callable`.
    `static boolean` | CommandLine.`printHelpIfRequested(List<CommandLine> parsedCommands, PrintStream out, CommandLine.Help.Ansi ansi)` Deprecated. use `printHelpIfRequested(List, PrintStream, PrintStream, Help.Ansi)` instead
    `static boolean` | CommandLine.`printHelpIfRequested(List<CommandLine> parsedCommands, PrintStream out, PrintStream err, 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.
    `static boolean` | CommandLine.`printHelpIfRequested(List<CommandLine> parsedCommands, PrintStream out, PrintStream err, CommandLine.Help.ColorScheme colorScheme)` Helper method that may be useful when processing the list of `CommandLine` objects that result from successfully parsing command line arguments.

    Constructors in picocli with parameters of type CommandLine
    Constructor and Description
    `ExecutionException(CommandLine commandLine, String msg)`
    `ExecutionException(CommandLine commandLine, String msg, Throwable t)`
    `MaxValuesExceededException(CommandLine commandLine, String msg)`
    `MissingParameterException(CommandLine commandLine, Collection<CommandLine.Model.ArgSpec> missing, String msg)`
    `MissingParameterException(CommandLine commandLine, CommandLine.Model.ArgSpec missing, String msg)`
    `MissingTypeConverterException(CommandLine commandLine, String msg)`
    `OverwrittenOptionException(CommandLine commandLine, CommandLine.Model.ArgSpec overwritten, String msg)`
    `ParameterException(CommandLine commandLine, String msg)` Constructs a new ParameterException with the specified CommandLine and error message.
    `ParameterException(CommandLine commandLine, String msg, CommandLine.Model.ArgSpec argSpec, String value)` Constructs a new ParameterException with the specified CommandLine and error message.
    `ParameterException(CommandLine commandLine, String msg, Throwable t)` Constructs a new ParameterException with the specified CommandLine and error message.
    `ParameterException(CommandLine commandLine, String msg, Throwable t, CommandLine.Model.ArgSpec argSpec, String value)` Constructs a new ParameterException with the specified CommandLine and error message.
    `UnmatchedArgumentException(CommandLine commandLine, List<String> args)`
    `UnmatchedArgumentException(CommandLine commandLine, Stack<String> args)`
    `UnmatchedArgumentException(CommandLine commandLine, String msg)`

  - ### Uses of CommandLine in picocli.groovy

    Methods in picocli.groovy that return CommandLine
    Modifier and Type | Method and Description
    --- | ---
    `CommandLine` | PicocliBaseScript.`createCommandLine()` Create and returns a new CommandLine instance.
    `protected CommandLine` | PicocliBaseScript.`getOrCreateCommandLine()` Return the CommandLine for this script.

    Methods in picocli.groovy that return types with arguments of type CommandLine
    Modifier and Type | Method and Description
    --- | ---
    `List<CommandLine>` | PicocliBaseScript.`parseScriptArguments(CommandLine commandLine, String[] args)` Returns the result of calling `parse(String...)` with the given arguments.

    Methods in picocli.groovy with parameters of type CommandLine
    Modifier and Type | Method and Description
    --- | ---
    `Object` | PicocliBaseScript.`handleExecutionException(CommandLine commandLine, String[] args, Exception ex)` If an Exception occurs during `PicocliBaseScript.runRunnableSubcommand(List)`, or `PicocliBaseScript.runScriptBody()` then this gets called to report the problem.
    `List<CommandLine>` | PicocliBaseScript.`parseScriptArguments(CommandLine commandLine, String[] args)` Returns the result of calling `parse(String...)` with the given arguments.
    `Object` | PicocliBaseScript.`printHelpMessage(CommandLine commandLine)` If an @Option whose `usageHelp` attribute is annotated as true appears in the arguments.
    `Object` | PicocliBaseScript.`printHelpMessage(CommandLine commandLine, PrintStream stream)` If an @Option whose `usageHelp` attribute is annotated as true appears in the arguments.
    `Object` | PicocliBaseScript.`printVersionHelpMessage(CommandLine commandLine)` If an @Option whose `versionHelp` attribute is annotated as true appears in the arguments.

    Method parameters in picocli.groovy with type arguments of type CommandLine
    Modifier and Type | Method and Description
    --- | ---
    `void` | PicocliBaseScript.`runRunnableSubcommand(List<CommandLine> parsedCommands)` If the most specific subcommand (the last `CommandLine` object in the list) implements Runnable or Callable, then run it.

Copyright © 2019. All rights reserved.