Class JCommander.Builder

  • Enclosing class:
    JCommander

    public static class JCommander.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • addObject

        public JCommander.Builder addObject​(java.lang.Object o)
        Adds the provided arg object to the set of objects that this commander will parse arguments into.
        Parameters:
        o - The arg object expected to contain Parameter annotations. If object is an array or is Iterable, the child objects will be added instead.
      • resourceBundle

        public JCommander.Builder resourceBundle​(java.util.ResourceBundle bundle)
        Sets the ResourceBundle to use for looking up descriptions. Set this to null to use description text directly.
      • expandAtSign

        public JCommander.Builder expandAtSign​(java.lang.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​(java.lang.String name)
        Set the program name (used only in the usage).
      • 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
      • allowAbbreviatedOptions

        public JCommander.Builder allowAbbreviatedOptions​(boolean b)
      • allowParameterOverwriting

        public JCommander.Builder allowParameterOverwriting​(boolean b)
      • atFileCharset

        public JCommander.Builder atFileCharset​(java.nio.charset.Charset charset)
      • addCommand

        public JCommander.Builder addCommand​(java.lang.String name,
                                             java.lang.Object command,
                                             java.lang.String... aliases)