Package com.beust.jcommander
Class JCommander.Builder
- java.lang.Object
-
- com.beust.jcommander.JCommander.Builder
-
- Enclosing class:
- JCommander
public static class JCommander.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
addObject
public JCommander.Builder addObject(Object o)
Adds the provided arg object to the set of objects that this commander will parse arguments into.
-
resourceBundle
public JCommander.Builder resourceBundle(ResourceBundle bundle)
Sets theResourceBundle
to use for looking up descriptions. Set this tonull
to use description text directly.
-
args
public JCommander.Builder args(String[] args)
-
console
public JCommander.Builder console(com.beust.jcommander.internal.Console console)
-
expandAtSign
public JCommander.Builder expandAtSign(Boolean expand)
Disables expanding@file
. JCommander supports the@file
syntax, which allows you to put all your options into a file and pass this file as parameter @param expandAtSign whether to expand@file
.
-
programName
public JCommander.Builder programName(String name)
Set the program name (used only in the usage).
-
columnSize
public JCommander.Builder columnSize(int columnSize)
-
defaultProvider
public JCommander.Builder defaultProvider(IDefaultProvider provider)
Define the default provider for this instance.
-
addConverterFactory
public JCommander.Builder addConverterFactory(IStringConverterFactory factory)
Adds a factory to lookup string converters. The added factory is used prior to previously added factories.- Parameters:
factory
- the factory determining string converters
-
verbose
public JCommander.Builder verbose(int verbose)
-
allowAbbreviatedOptions
public JCommander.Builder allowAbbreviatedOptions(boolean b)
-
acceptUnknownOptions
public JCommander.Builder acceptUnknownOptions(boolean b)
-
allowParameterOverwriting
public JCommander.Builder allowParameterOverwriting(boolean b)
-
atFileCharset
public JCommander.Builder atFileCharset(Charset charset)
-
addConverterInstanceFactory
public JCommander.Builder addConverterInstanceFactory(IStringConverterInstanceFactory factory)
-
addCommand
public JCommander.Builder addCommand(Object command)
-
addCommand
public JCommander.Builder addCommand(String name, Object command, String... aliases)
-
usageFormatter
public JCommander.Builder usageFormatter(IUsageFormatter usageFormatter)
-
build
public JCommander build()
-
-