public class ParserProperties extends Object
CmdLineParser
behaviours.Modifier and Type | Method and Description |
---|---|
static ParserProperties |
defaults()
Returns an instance of the default parser properties.
|
boolean |
getAtSyntax()
Gets whether @-prefix-parsing is enabled.
|
String |
getOptionValueDelimiter() |
boolean |
getShowDefaults()
Gets whether show defaults is enabled.
|
ParserProperties |
withAtSyntax(boolean atSyntax)
Toggles the parsing of @-prefixes in values.
|
ParserProperties |
withOptionSorter(Comparator<OptionHandler> sorter)
Controls how options are sorted in the usage screen.
|
ParserProperties |
withOptionValueDelimiter(String v)
Sets the string used to separate option name and its value (such as --foo=bar vs --foo bar)
Default to whitespace.
|
ParserProperties |
withShowDefaults(boolean showDefaults)
Toggles the showing of default values in the command line help.
|
ParserProperties |
withUsageWidth(int usageWidth)
Sets the width of a usage line.
|
public static ParserProperties defaults()
withXXX()
methods
in this class.public ParserProperties withAtSyntax(boolean atSyntax)
atSyntax
- true
if at sign is being parsed, false
if it is to be ignored. Defaults to true
.getAtSyntax()
public boolean getAtSyntax()
withAtSyntax(boolean)
public ParserProperties withShowDefaults(boolean showDefaults)
showDefaults
- true
if to show defaults, false
otherweise. Defaults to true
.getShowDefaults()
public boolean getShowDefaults()
withShowDefaults(boolean)
public ParserProperties withUsageWidth(int usageWidth)
80
.usageWidth
- the width of the usage output in columns.IllegalArgumentException
- if usageWidth
is negativepublic ParserProperties withOptionSorter(Comparator<OptionHandler> sorter)
sorter
- If non-null
, options are sorted in the order induced by this comparator.public ParserProperties withOptionValueDelimiter(String v)
public String getOptionValueDelimiter()
Copyright © 2003-2016 Kohsuke Kawaguchi. All Rights Reserved.