public interface Subparser extends ArgumentParser
This interface defines Subparser used to add sub-command to
ArgumentParser.
| Modifier and Type | Method and Description |
|---|---|
Subparser |
aliases(String... alias)
Sets alias names for this Subparser.
|
Subparser |
defaultHelp(boolean defaultHelp)
If defaultHelp is
true, the default values of arguments are
printed in help message. |
Subparser |
description(String description)
Sets the description for the arguments of this container.
|
Subparser |
epilog(String epilog)
Sets the text to display after the argument help.
|
Subparser |
help(FeatureControl ctrl)
Sets special value to control help message handling.
|
Subparser |
help(String help)
Sets the text to display in help message.
|
Subparser |
setDefault(String dest,
Object value)
Sets parser-level default value of attribute
dest. |
Subparser |
setDefaults(Map<String,Object> attrs)
Sets parser-level default values from
attrs. |
Subparser |
version(String version)
Sets version string.
|
addArgumentGroup, addMutuallyExclusiveGroup, addMutuallyExclusiveGroup, addSubparsers, formatHelp, formatUsage, formatVersion, getConfig, getDefault, handleError, handleError, parseArgs, parseArgs, parseArgs, parseArgs, parseArgsOrFail, parseKnownArgs, parseKnownArgs, parseKnownArgs, parseKnownArgs, parseKnownArgsOrFail, printHelp, printHelp, printUsage, printUsage, printVersion, printVersion, usageaddArgumentSubparser description(String description)
ArgumentContainerdescription in interface ArgumentContainerdescription in interface ArgumentParserdescription - The description of this container.Subparser epilog(String epilog)
ArgumentParserepilog in interface ArgumentParserepilog - The text to display after the argument help.Subparser version(String version)
ArgumentParser
Sets version string. It will be displayed ArgumentParser.printVersion().
If the given usage contains ${prog} string, it will be replaced
with the program name given in
ArgumentParsers.newArgumentParser(String). This processed text
will be printed without text-wrapping.
version in interface ArgumentParserversion - The version string.Subparser defaultHelp(boolean defaultHelp)
ArgumentParser
If defaultHelp is true, the default values of arguments are
printed in help message.
By default, the default values are not printed in help message.
defaultHelp in interface ArgumentParserdefaultHelp - Switch to display the default value in help message.Subparser setDefault(String dest, Object value)
ArgumentParser
Sets parser-level default value of attribute dest.
The parser-level defaults always override argument-level defaults.
setDefault in interface ArgumentParserdest - The attribute name.value - The default value.Subparser setDefaults(Map<String,Object> attrs)
ArgumentParser
Sets parser-level default values from attrs.
All key-value pair in attrs are registered to parser-level
defaults. The parser-level defaults always override argument-level
defaults.
setDefaults in interface ArgumentParserattrs - The parser-level default values to add.Subparser help(String help)
help - The text to display in help message.Subparser help(FeatureControl ctrl)
Sets special value to control help message handling.
Currently, only FeatureControl.SUPPRESS is available. If it is
given, the help entry for this Subparser is not displayed in the help
message.
ctrl - The special value to control help message handling.Subparser aliases(String... alias)
Subparsers instance which this object belongs to.alias - Alias name for this Subparser.Copyright © 2012–2017. All rights reserved.