Class AntOption

java.lang.Object
org.apache.rat.ui.UIOption<AntOption>
org.apache.rat.documentation.options.AntOption

public class AntOption extends UIOption<AntOption>
A class that wraps the CLI option and provides Ant specific values.
  • Constructor Details

    • AntOption

      public AntOption(UIOptionCollection<AntOption> collection, org.apache.commons.cli.Option option)
      Constructor.
      Parameters:
      option - the option to wrap.
  • Method Details

    • isAttribute

      public boolean isAttribute()
      Returns true if the option should be an attribute of the <rat:report> element.
      Returns:
      true if the option should be an attribute of the <rat:report> element.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isElement

      public boolean isElement()
      Returns true if the option should be a child element of the <rat:report> element.
      Returns:
      true if the option should be a child element of the <rat:report> element.
    • getActualAntOption

      public AntOption getActualAntOption()
      If this option is converted to another option return that option otherwise return this option.
      Returns:
      the converted option.
    • convertedFrom

      public Set<AntOption> convertedFrom()
      Gets the set of options that are mapped to this option.
      Returns:
      the set of options that are mapped to this option.
    • getText

      public String getText()
      Description copied from class: UIOption
      return a string showing long and short options if they are available. Will return a string.
      Specified by:
      getText in class UIOption<AntOption>
      Returns:
      A string showing long and short options if they are available. Never null.
    • cleanupName

      protected String cleanupName(org.apache.commons.cli.Option option)
      Description copied from class: UIOption
      Provide means to wrap the given option depending on the UI-specific option implementation.
      Specified by:
      cleanupName in class UIOption<AntOption>
      Parameters:
      option - The CLI option
      Returns:
      the cleaned up option name.
    • cleanupName

      public String cleanupName()
    • buildType

      public AntOptionCollection.BuildType buildType()
    • getExample

      public String getExample()
      Description copied from class: UIOption
      Gets an example of how to use this option in the native UI.
      Specified by:
      getExample in class UIOption<AntOption>
      Returns:
      An example of how to use this option in the native UI.