Uses of Class
picocli.CommandLine.Model.CommandSpec
-
Uses of CommandLine.Model.CommandSpec in picocli
Fields in picocli declared as CommandLine.Model.CommandSpecModifier and TypeFieldDescriptionprivate CommandLine.Model.CommandSpec
CommandLine.commandSpec
private final CommandLine.Model.CommandSpec
CommandLine.Help.commandSpec
private final CommandLine.Model.CommandSpec
CommandLine.Help.DefaultParamLabelRenderer.commandSpec
(package private) CommandLine.Model.CommandSpec
CommandLine.Model.ArgSpec.commandSpec
private CommandLine.Model.CommandSpec
CommandLine.Model.CommandUserObject.commandSpec
private final CommandLine.Model.CommandSpec
CommandLine.Model.Interpolator.commandSpec
private final CommandLine.Model.CommandSpec
CommandLine.ParseResult.Builder.commandSpec
private final CommandLine.Model.CommandSpec
CommandLine.ParseResult.commandSpec
private CommandLine.Model.CommandSpec
CommandLine.Model.CommandSpec.parent
(package private) CommandLine.Model.CommandSpec
AutoComplete.App.spec
(package private) CommandLine.Model.CommandSpec
AutoComplete.GenerateCompletion.spec
private final CommandLine.Model.CommandSpec
CommandLine.Model.Messages.spec
private final CommandLine.Model.CommandSpec
CommandLine.Model.MethodBinding.spec
Fields in picocli with type parameters of type CommandLine.Model.CommandSpecModifier and TypeFieldDescriptionprivate final Map
<String, CommandLine.Model.CommandSpec> CommandLine.Model.CommandSpec.mixins
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.private CommandLine.Model.CommandSpec
CommandLine.Model.CommandSpec.addArg
(CommandLine.Model.ArgSpec arg) CommandLine.Model.CommandSpec.addArgGroup
(CommandLine.Model.ArgGroupSpec group) Adds the specified argument group to the groups in this command.private CommandLine.Model.CommandSpec
CommandLine.Model.CommandSpec.addArgGroup
(CommandLine.Model.ArgGroupSpec group, Set<CommandLine.Model.OptionSpec> groupOptions, Set<CommandLine.Model.PositionalParamSpec> groupPositionals) 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.private static CommandLine.Model.CommandSpec
CommandLine.Model.CommandReflection.buildMixinForMember
(CommandLine.Model.IAnnotatedElement member, CommandLine.IFactory factory) 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.private CommandLine.Model.CommandSpec
CommandLine.Model.CommandSpec.copy()
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.(package private) static CommandLine.Model.CommandSpec
CommandLine.Model.CommandReflection.extractCommandSpec
(Object command, CommandLine.IFactory factory, boolean annotationsAreMandatory) private static CommandLine.Model.CommandSpec
AutoComplete.findCommandFor
(CommandLine.Model.ArgSpec arg, CommandLine.Model.CommandSpec cmd) private static CommandLine.Model.CommandSpec
AutoComplete.findCommandFor
(CommandLine.Model.OptionSpec option, CommandLine.Model.CommandSpec commandSpec) private static CommandLine.Model.CommandSpec
AutoComplete.findCommandFor
(CommandLine.Model.PositionalParamSpec positional, CommandLine.Model.CommandSpec commandSpec) 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.NoOpModelTransformer.transform
(CommandLine.Model.CommandSpec commandSpec) 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 TypeMethodDescriptionprivate static void
AutoComplete.addCandidatesForArgsFollowing
(CommandLine.Model.CommandSpec commandSpec, List<CharSequence> candidates) 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.addSubcommand
(String name, CommandLine.Model.CommandSpec subcommand) Adds the specified subcommand with the specified name.private static CommandLine.Model.ArgGroupSpec
CommandLine.Model.CommandReflection.buildArgGroupForMember
(CommandLine.Model.IAnnotatedElement member, CommandLine.IFactory factory, CommandLine.Model.CommandSpec commandSpec) 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.void
CommandLine.NullParameterConsumer.consumeParameters
(Stack<String> args, CommandLine.Model.ArgSpec argSpec, CommandLine.Model.CommandSpec commandSpec) 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.DefaultHelpFactory.create
(CommandLine.Model.CommandSpec commandSpec, CommandLine.Help.ColorScheme colorScheme) CommandLine.IHelpFactory.create
(CommandLine.Model.CommandSpec commandSpec, CommandLine.Help.ColorScheme colorScheme) Returns aHelp
instance to assist in rendering the usage help message(package private) static CommandLine.Model.TypedMember
CommandLine.Model.TypedMember.createIfAnnotated
(Method method, CommandLine.Model.IScope scope, CommandLine.Model.CommandSpec spec) CommandLine.Model.ArgGroupSpec.createLabelRenderer
(CommandLine.Model.CommandSpec commandSpec) private static Properties
CommandLine.PropertiesDefaultProvider.createProperties
(File file, CommandLine.Model.CommandSpec commandSpec) private static Properties
CommandLine.PropertiesDefaultProvider.createProperties
(InputStream in, String locationDescription, CommandLine.Model.CommandSpec commandSpec) (package private) static CommandLine.Model.ArgGroupSpec
CommandLine.Model.CommandReflection.extractArgGroupSpec
(CommandLine.Model.IAnnotatedElement member, CommandLine.IFactory factory, CommandLine.Model.CommandSpec commandSpec, boolean annotationsAreMandatory) private static CommandLine.Model.CommandSpec
AutoComplete.findCommandFor
(CommandLine.Model.ArgSpec arg, CommandLine.Model.CommandSpec cmd) private static CommandLine.Model.CommandSpec
AutoComplete.findCommandFor
(CommandLine.Model.OptionSpec option, CommandLine.Model.CommandSpec commandSpec) private static CommandLine.Model.CommandSpec
AutoComplete.findCommandFor
(CommandLine.Model.PositionalParamSpec positional, CommandLine.Model.CommandSpec commandSpec) private String
CommandLine.PropertiesDefaultProvider.getValue
(String key, CommandLine.Model.CommandSpec spec) private void
CommandLine.Model.CommandSpec.inheritAttributesFrom
(CommandLine.Model.CommandSpec root) private void
CommandLine.Model.CommandSpec.initFrom
(CommandLine.Model.CommandSpec spec) (package private) void
CommandLine.Model.UsageMessageSpec.initFrom
(CommandLine.Model.UsageMessageSpec settings, CommandLine.Model.CommandSpec commandSpec) private static boolean
CommandLine.Model.CommandReflection.initFromAnnotatedMembers
(CommandLine.Model.IScope scope, Class<?> cls, CommandLine.Model.CommandSpec receiver, CommandLine.Model.ArgGroupSpec.Builder groupBuilder, CommandLine.IFactory factory, CommandLine.Model.Predicate<CommandLine.Model.TypedMember> predicate) private static boolean
CommandLine.Model.CommandReflection.initFromAnnotatedTypedMembers
(CommandLine.Model.TypedMember member, CommandLine.Model.Predicate<CommandLine.Model.TypedMember> predicate, CommandLine.Model.CommandSpec commandSpec, CommandLine.Model.ArgGroupSpec.Builder groupBuilder, CommandLine.IFactory factory) private static boolean
CommandLine.Model.CommandReflection.initFromMethodParameters
(CommandLine.Model.IScope scope, Method method, CommandLine.Model.CommandSpec receiver, CommandLine.Model.ArgGroupSpec.Builder groupBuilder, CommandLine.IFactory factory) (package private) void
CommandLine.Model.UsageMessageSpec.initFromMixin
(CommandLine.Model.UsageMessageSpec mixin, CommandLine.Model.CommandSpec commandSpec) private static void
CommandLine.Model.CommandReflection.initMethodSubcommands
(Class<?> cls, CommandLine.Model.CommandSpec parent, CommandLine.IFactory factory) private static void
CommandLine.Model.CommandReflection.initSubcommands
(CommandLine.Command cmd, Class<?> cls, CommandLine.Model.CommandSpec parent, CommandLine.IFactory factory, Set<Class<?>> hierarchy) private static void
CommandLine.Model.CommandReflection.injectSpecIntoVersionProvider
(CommandLine.Model.CommandSpec result, CommandLine.Command cmd, CommandLine.IFactory factory) private static Properties
CommandLine.PropertiesDefaultProvider.loadProperties
(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.boolean
CommandLine.NoOpParameterPreprocessor.preprocess
(Stack<String> args, CommandLine.Model.CommandSpec commandSpec, CommandLine.Model.ArgSpec argSpec, Map<String, Object> info) CommandLine.IModelTransformer.transform
(CommandLine.Model.CommandSpec commandSpec) Given an original CommandSpec, return the object that should be used instead.CommandLine.NoOpModelTransformer.transform
(CommandLine.Model.CommandSpec commandSpec) private void
CommandLine.Model.CommandSpec.updatedSubcommandsToInheritFrom
(CommandLine.Model.CommandSpec root) (package private) void
CommandLine.Model.UsageMessageSpec.updateFromCommand
(CommandLine.Command cmd, CommandLine.Model.CommandSpec commandSpec, boolean loadResourceBundle) private void
CommandLine.Interpreter.updateHelpRequested
(CommandLine.Model.CommandSpec command) private static void
CommandLine.Model.CommandReflection.validateCommandSpec
(CommandLine.Model.CommandSpec result, boolean hasCommandAnnotation, String commandClassName) private String
CommandLine.Model.CommandSpec.validateSubcommandName
(String name, CommandLine.Model.CommandSpec subSpec) Constructors in picocli with parameters of type CommandLine.Model.CommandSpecModifierConstructorDescriptionprivate
DefaultParamLabelRenderer
(CommandLine.Model.CommandSpec commandSpec) Constructs a new DefaultParamLabelRenderer with the specified separator string.Help
(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.Interpolator
(CommandLine.Model.CommandSpec commandSpec) Messages
(CommandLine.Model.CommandSpec spec, String baseName) Messages
(CommandLine.Model.CommandSpec spec, String baseName, ResourceBundle rb) (package private)
MethodBinding
(CommandLine.Model.IScope scope, Method method, CommandLine.Model.CommandSpec spec) private
TypedMember
(Method method, CommandLine.Model.IScope scope, CommandLine.Model.CommandSpec spec)