Class Options.StringOptionDef

java.lang.Object
com.portal.common.Options.OptionDef
com.portal.common.Options.StringOptionDef
Enclosing class:
Options

protected class Options.StringOptionDef extends Options.OptionDef
Definition of a string option. This is an option that will be followed by a single string value or mulitple string values on the command line.
  • Constructor Details

    • StringOptionDef

      public StringOptionDef(String name, String defValue, String desc)
      Construct an string option. This is an option that will be followed by a single string value on the command line. If the option does not appear on the command line then use the specified default value.

      Parameters:
      name - The name of the option. The name should include the leading "-" (i.e. -account).
      defValue - The default value to use if the option does not appear on the command line.
      desc - The description of the option.
    • StringOptionDef

      public StringOptionDef(String name, String[] defValues, String desc)
      Construct an string option. This is an option that will be followed by an indefinite number of values on the command line. If the option does not appear on the command line then use the specified default values.

      Parameters:
      name - The name of the option. The name should include the leading "-" (i.e. -account).
      desc - The description of the option.
      defValue - The default values to use if the option does not appear on the command line.
    • StringOptionDef

      public StringOptionDef(String name, String desc)
      Construct an string option. This is an option that will be followed by a single string value on the command line. This is a required option and the parse method will throw an exception if the option does not appear on the command line.

      Parameters:
      name - The name of the option. The name should include the leading "-" (i.e. -account).
      desc - The description of the option.