Uses of Class
picocli.CommandLine.Model.CommandSpec
Packages that use CommandLine.Model.CommandSpec
Package
Description
Provides classes and interfaces for the main picocli command line parsing and
autocompletion
functionality.Provides classes and interfaces that form a framework for creating picocli annotation processors.
Provides tools for generating GraalVM configuration files from a picocli CommandSpec model.
Provides tools for generating man-page documentation in AsciiDoc format from a picocli CommandSpec model.
Provides utility classes for internal use in the picocli-codegen module.
-
Uses of CommandLine.Model.CommandSpec in picocli
Methods in picocli that return CommandLine.Model.CommandSpecModifier and TypeMethodDescriptionCommandLine.Model.CommandSpec.add
(CommandLine.Model.ArgSpec arg) Adds the specified option spec or positional parameter spec to the list of configured arguments to expect.CommandLine.Model.CommandSpec.addArgGroup
(CommandLine.Model.ArgGroupSpec group) Adds the specified argument group to the groups in this command.CommandLine.Model.CommandSpec.addMethodSubcommands()
Reflects on the class of the user object and registers any command methods (class methods annotated with@Command
) as subcommands.CommandLine.Model.CommandSpec.addMethodSubcommands
(CommandLine.IFactory factory) Reflects on the class of the user object and registers any command methods (class methods annotated with@Command
) as subcommands.CommandLine.Model.CommandSpec.addMixin
(String name, CommandLine.Model.CommandSpec mixin) Adds the specified mixinCommandSpec
object to the map of mixins for this command.CommandLine.Model.CommandSpec.addMixin
(String name, CommandLine.Model.CommandSpec mixin, CommandLine.Model.IAnnotatedElement annotatedElement) Adds the specified mixinCommandSpec
object to the map of mixins for this command.CommandLine.Model.CommandSpec.addOption
(CommandLine.Model.OptionSpec option) Adds the specified option spec to the list of configured arguments to expect.CommandLine.Model.CommandSpec.addParentCommandElement
(CommandLine.Model.IAnnotatedElement spec) Adds the specified{@literal @}ParentCommand
-annotated program element to the list of elements for this command.CommandLine.Model.CommandSpec.addPositional
(CommandLine.Model.PositionalParamSpec positional) Adds the specified positional parameter spec to the list of configured arguments to expect.CommandLine.Model.CommandSpec.addSpecElement
(CommandLine.Model.IAnnotatedElement spec) Adds the specified{@literal @}Spec
-annotated program element to the list of elements for this command.CommandLine.Model.CommandSpec.addSubcommand
(String name, CommandLine subCommandLine) Adds the specified subcommand with the specified name.CommandLine.Model.CommandSpec.addSubcommand
(String name, CommandLine.Model.CommandSpec subcommand) Adds the specified subcommand with the specified name.CommandLine.Model.CommandSpec.addUnmatchedArgsBinding
(CommandLine.Model.UnmatchedArgsBinding spec) Adds the specifiedUnmatchedArgsBinding
to the list of model objects to capture unmatched arguments for this command.Sets the alternative names by which this subcommand is recognized on the command line.CommandLine.Model.ArgSpec.command()
Returns the command this option or positional parameter belongs to.protected CommandLine.Model.CommandSpec
CommandLine.Model.CommandSpec.commandLine
(CommandLine commandLine) Sets the CommandLine constructed with thisCommandSpec
model.CommandLine.Help.commandSpec()
Returns theCommandSpec
model that this Help was constructed with.CommandLine.Model.Messages.commandSpec()
Returns the CommandSpec of this object, nevernull
.CommandLine.ParseResult.commandSpec()
Returns theCommandSpec
for the matched command.CommandLine.Model.CommandSpec.create()
Creates and returns a newCommandSpec
without any associated user object.CommandLine.Model.CommandSpec.defaultValueProvider
(CommandLine.IDefaultValueProvider defaultValueProvider) Sets default value provider for this command.CommandLine.Model.CommandSpec.exitCodeOnExecutionException
(int newValue) Sets exit code signifying that an exception occurred when invoking the Runnable, Callable or Method user object of a command.CommandLine.Model.CommandSpec.exitCodeOnInvalidInput
(int newValue) Sets exit code for command line usage error.CommandLine.Model.CommandSpec.exitCodeOnSuccess
(int newValue) Sets exit code for successful termination.CommandLine.Model.CommandSpec.exitCodeOnUsageHelp
(int newValue) Sets exit code for successful termination after printing usage help on user request.CommandLine.Model.CommandSpec.exitCodeOnVersionHelp
(int newValue) Sets exit code for successful termination after printing version help on user request.CommandLine.Model.CommandSpec.forAnnotatedObject
(Object userObject) Creates and returns a newCommandSpec
initialized from the specified associated user object.CommandLine.Model.CommandSpec.forAnnotatedObject
(Object userObject, CommandLine.IFactory factory) Creates and returns a newCommandSpec
initialized from the specified associated user object.CommandLine.Model.CommandSpec.forAnnotatedObjectLenient
(Object userObject) Creates and returns a newCommandSpec
initialized from the specified associated user object.CommandLine.Model.CommandSpec.forAnnotatedObjectLenient
(Object userObject, CommandLine.IFactory factory) Creates and returns a newCommandSpec
initialized from the specified associated user object.CommandLine.getCommandSpec()
Returns theCommandSpec
model that thisCommandLine
was constructed with.CommandLine.Model.CommandSpec.helpCommand
(boolean newValue) Sets whether this is a help command and required parameter checking should be suspended.CommandLine.Model.CommandSpec.interpolateVariables
(Boolean interpolate) Sets whether variables should be interpolated in String values.CommandLine.Model.CommandSpec.mixinStandardHelpOptions
(boolean newValue) Sets whether the standard help options should be mixed in with this command.CommandLine.Model.CommandSpec.modelTransformer
(CommandLine.IModelTransformer modelTransformer) Sets the model transformer for this CommandSpec instance.Sets the String to use as the program name in the synopsis line of the help message.CommandLine.Model.CommandSpec.negatableOptionTransformer
(CommandLine.INegatableOptionTransformer newValue) Sets theINegatableOptionTransformer
used to create the negative form of negatable options.CommandLine.Model.CommandSpec.optionsCaseInsensitive
(boolean caseInsensitiveOptions) Sets the case-insensitivity of options.CommandLine.Model.CommandSpec.parent()
Returns the parent command of this subcommand, ornull
if this is a top-level command.CommandLine.Model.CommandSpec.parent
(CommandLine.Model.CommandSpec parent) Sets the parent command of this subcommand.CommandLine.Model.CommandSpec.parser
(CommandLine.Model.ParserSpec settings) Initializes the parser specification for this command from the specified settings and returns this commandSpec.CommandLine.Model.CommandSpec.preprocessor
(CommandLine.IParameterPreprocessor preprocessor) Sets the preprocessor for this CommandSpec instance.CommandLine.Model.CommandSpec.remove
(CommandLine.Model.ArgSpec arg) (INCUBATING) Removes the specified option spec or positional parameter spec from the list of configured arguments to expect.CommandLine.Model.CommandSpec.resourceBundle
(ResourceBundle bundle) Initializes the resource bundle for this command: sets theUsageMessageSpec.messages
to aMessages
object created from this command spec and the specified bundle, and then sets theArgSpec.messages
of all options and positional parameters in this command to the sameMessages
instance.CommandLine.Model.CommandSpec.resourceBundleBaseName
(String resourceBundleBaseName) Initializes the resource bundle for this command: sets theUsageMessageSpec.messages
to aMessages
object created from this command spec and the specified bundle, and then sets theArgSpec.messages
of all options and positional parameters in this command to the sameMessages
instance.CommandLine.Model.CommandSpec.root()
Returns the root command: the top-level command of the hierarchy, nevernull
.CommandLine.Model.CommandSpec.scopeType
(CommandLine.ScopeType scopeType) Sets the scope of where this argument applies: only this command, or also all sub (and sub-sub) commands, and returns this builder.CommandLine.Model.CommandSpec.setAddMethodSubcommands
(Boolean addMethodSubcommands) Sets whether method commands should be added as subcommands.CommandLine.Model.CommandSpec.subcommandsCaseInsensitive
(boolean caseInsensitiveSubcommands) Sets the case-insensitivity of subcommands.CommandLine.Model.CommandSpec.subcommandsRepeatable
(boolean subcommandsRepeatable) Sets whether the subcommands of this command are repeatable, that is, whether such subcommands can occur multiple times and may be followed by sibling commands instead of just child commands.CommandLine.IModelTransformer.transform
(CommandLine.Model.CommandSpec commandSpec) Given an original CommandSpec, return the object that should be used instead.CommandLine.Model.CommandSpec.usageMessage
(CommandLine.Model.UsageMessageSpec settings) Initializes the usageMessage specification for this command from the specified settings and returns this commandSpec.Sets version information literals for this command, to print to the console when the user specifies an option to request version help.CommandLine.Model.CommandSpec.versionProvider
(CommandLine.IVersionProvider versionProvider) Sets version provider for this command, to generate theversion()
strings.CommandLine.Model.CommandSpec.withToString
(String newValue) Sets the string representation of this command, used in error messages and trace messages.CommandLine.Model.CommandSpec.wrapWithoutInspection
(Object userObject) Creates and returns a newCommandSpec
with the specified associated user object.CommandLine.Model.CommandSpec.wrapWithoutInspection
(Object userObject, CommandLine.IFactory factory) Creates and returns a newCommandSpec
with the specified associated user object.Methods in picocli that return types with arguments of type CommandLine.Model.CommandSpecModifier and TypeMethodDescriptionCommandLine.Model.CommandSpec.mixins()
Returns a map of the mixin names to mixinCommandSpec
objects configured for this command.Methods in picocli with parameters of type CommandLine.Model.CommandSpecModifier and TypeMethodDescriptionCommandLine.Model.CommandSpec.addMixin
(String name, CommandLine.Model.CommandSpec mixin) Adds the specified mixinCommandSpec
object to the map of mixins for this command.CommandLine.Model.CommandSpec.addMixin
(String name, CommandLine.Model.CommandSpec mixin, CommandLine.Model.IAnnotatedElement annotatedElement) Adds the specified mixinCommandSpec
object to the map of mixins for this command.CommandLine.Model.CommandSpec.addSubcommand
(String name, CommandLine.Model.CommandSpec subcommand) Adds the specified subcommand with the specified name.CommandLine.ParseResult.builder
(CommandLine.Model.CommandSpec commandSpec) Creates and returns a newParseResult.Builder
for the specified command spec.static int
AutoComplete.complete
(CommandLine.Model.CommandSpec spec, String[] args, int argIndex, int positionInArg, int cursor, List<CharSequence> candidates) void
CommandLine.IParameterConsumer.consumeParameters
(Stack<String> args, CommandLine.Model.ArgSpec argSpec, CommandLine.Model.CommandSpec commandSpec) Consumes as many of the specified command line arguments as needed by popping them off the specified Stack.static CommandLine.Model.Messages
CommandLine.Model.Messages.copy
(CommandLine.Model.CommandSpec spec, CommandLine.Model.Messages original) Returns a copy of the specified Messages object with the CommandSpec replaced by the specified one.CommandLine.IHelpFactory.create
(CommandLine.Model.CommandSpec commandSpec, CommandLine.Help.ColorScheme colorScheme) Returns aHelp
instance to assist in rendering the usage help messageCommandLine.Model.ArgGroupSpec.createLabelRenderer
(CommandLine.Model.CommandSpec commandSpec) CommandLine.INegatableOptionTransformer.makeNegative
(String optionName, CommandLine.Model.CommandSpec cmd) Returns the negative form of the specified option name for the parser to recognize when parsing command line arguments.CommandLine.RegexTransformer.makeNegative
(String optionName, CommandLine.Model.CommandSpec cmd) Returns the negative form of the specified option name for the parser to recognize when parsing command line arguments.CommandLine.INegatableOptionTransformer.makeSynopsis
(String optionName, CommandLine.Model.CommandSpec cmd) Returns the documentation string to show in the synopsis and usage help message for the specified option.CommandLine.RegexTransformer.makeSynopsis
(String optionName, CommandLine.Model.CommandSpec cmd) Returns the documentation string to show in the synopsis and usage help message for the specified option.CommandLine.Model.CommandSpec.parent
(CommandLine.Model.CommandSpec parent) Sets the parent command of this subcommand.boolean
CommandLine.IParameterPreprocessor.preprocess
(Stack<String> args, CommandLine.Model.CommandSpec commandSpec, CommandLine.Model.ArgSpec argSpec, Map<String, Object> info) Called when either the command, option or positional parameter that has this preprocessor configured was recognized by the picocli parser.CommandLine.IModelTransformer.transform
(CommandLine.Model.CommandSpec commandSpec) Given an original CommandSpec, return the object that should be used instead.Constructors in picocli with parameters of type CommandLine.Model.CommandSpecModifierConstructorDescriptionHelp
(CommandLine.Model.CommandSpec commandSpec, CommandLine.Help.ColorScheme colorScheme) Constructs a newHelp
instance with the specified color scheme, initialized from annotations on the specified class and superclasses.Messages
(CommandLine.Model.CommandSpec spec, String baseName) Messages
(CommandLine.Model.CommandSpec spec, String baseName, ResourceBundle rb) -
Uses of CommandLine.Model.CommandSpec in picocli.codegen.annotation.processing
Method parameters in picocli.codegen.annotation.processing with type arguments of type CommandLine.Model.CommandSpecModifier and TypeMethodDescriptionprotected abstract boolean
AbstractCommandSpecProcessor.handleCommands
(Map<Element, CommandLine.Model.CommandSpec> commands, Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) Subclasses must implement this method and do something with theCommandSpec
command model objects that were found during compilation. -
Uses of CommandLine.Model.CommandSpec in picocli.codegen.aot.graalvm
Methods in picocli.codegen.aot.graalvm with parameters of type CommandLine.Model.CommandSpecModifier and TypeMethodDescriptionstatic String
DynamicProxyConfigGenerator.generateProxyConfig
(CommandLine.Model.CommandSpec[] specs, String[] interfaceClasses) Returns a JSON String with the interface names to generate dynamic proxy classes for in the native image, used by the specifiedCommandSpec
objects.static String
ReflectionConfigGenerator.generateReflectionConfig
(CommandLine.Model.CommandSpec... specs) Returns a JSON String with the program elements that will be accessed reflectively for the specifiedCommandSpec
objects.static String
ResourceConfigGenerator.generateResourceConfig
(CommandLine.Model.CommandSpec[] specs, String[] bundles, String[] resourceRegex) Returns a JSON String with the resources and resource bundles to include for the specifiedCommandSpec
objects. -
Uses of CommandLine.Model.CommandSpec in picocli.codegen.docgen.manpage
Methods in picocli.codegen.docgen.manpage with parameters of type CommandLine.Model.CommandSpecModifier and TypeMethodDescriptionstatic int
ManPageGenerator.generateManPage
(File outdir, File customizablePagesDirectory, boolean[] verbosity, boolean overwriteCustomizablePages, CommandLine.Model.CommandSpec... specs) Generates AsciiDoc files for the specified classes to the specified output directory, optionally also generating template files in thecustomizablePagesDirectory
directory.static void
ManPageGenerator.writeSingleManPage
(PrintWriter pw, CommandLine.Model.CommandSpec spec) -
Uses of CommandLine.Model.CommandSpec in picocli.codegen.util
Methods in picocli.codegen.util that return types with arguments of type CommandLine.Model.CommandSpecModifier and TypeMethodDescriptionstatic List<CommandLine.Model.CommandSpec>
Util.getCommandSpecs
(String factoryClass, Class<?>[] classes)