Class UIOptionCollection.Builder<T extends UIOption<T>, S extends UIOptionCollection.Builder<T,S>>

java.lang.Object
org.apache.rat.ui.UIOptionCollection.Builder<T,S>
Type Parameters:
T - the concreate type of the BaseOption.
S - the concrete type being built.
Direct Known Subclasses:
AntOptionCollection.Builder, MavenOptionCollection.Builder
Enclosing class:
UIOptionCollection<T extends UIOption<T>>

protected static class UIOptionCollection.Builder<T extends UIOption<T>, S extends UIOptionCollection.Builder<T,S>> extends Object
Builder for a BaseOptionCollection.
  • Field Details

    • unsupportedRatOptions

      protected final List<org.apache.commons.cli.Option> unsupportedRatOptions
      The list of unsupported RAT options.
  • Constructor Details

  • Method Details

    • build

      public UIOptionCollection<T> build()
      Build the UIOptionCollection.
      Returns:
      the UIOptionCollection.
    • self

      protected final S self()
      Returns this cast to <S> class.
      Returns:
      this as <S> class.
    • uiOption

      public S uiOption(org.apache.commons.cli.Option uiOption)
      Add a UI option to the collection.
      Parameters:
      uiOption - the UI Option to add.
      Returns:
      this
    • uiOptions

      public S uiOptions(org.apache.commons.cli.Option... uiOption)
      Add a UI options to the collection.
      Parameters:
      uiOption - the UIOptions (<T> objects) to add.
      Returns:
      this
    • unsupported

      public S unsupported(org.apache.commons.cli.Option option)
      Register an option as unsupported.
      Parameters:
      option - the option that is not be supported. This should be an option in the Arg collection.
      Returns:
      this
    • unsupported

      public S unsupported(Arg arg)
      Register multiple options as unsupported. Will ignore all the options associated with the specified Arg.
      Parameters:
      arg - The Arg to ignore.
      Returns:
      this
    • defaultValue

      public S defaultValue(org.apache.commons.cli.Option option, String value)
      Specify the default values for an option.
      Parameters:
      option - the option to specify the default value for.
      value - the value for the option.
      Returns:
      this
    • defaultValue

      public S defaultValue(Arg arg, String value)
      Specify the default values for an Arg.
      Parameters:
      arg - the Arg to specify the default value for.
      value - the value for the option.
      Returns:
      this