Class RatTool

java.lang.Object
org.apache.rat.documentation.velocity.RatTool

@DefaultKey("rat") @ValidScope("application") public class RatTool extends Object
The Velocity RAT plugin that provides access to the RAT data.

DEVHINT: Be careful when removing methods as this may invalidate contents and functionality of the velocity templates.

  • Constructor Details

    • RatTool

      public RatTool()
      Constructor.
  • Method Details

    • options

      public List<org.apache.commons.cli.Option> options()
      Gets the list of command line options.
      Returns:
      the list of command line options.
    • antOptions

      public Map<String,AntOption> antOptions()
      Gets a map client option name to Ant Option.
      Returns:
      a map client option name to Ant Option.
    • cliOptions

      public Map<String,CLIOption> cliOptions()
      Gets a map client option name to CLI Option.
      Returns:
      a map client option name to CLI Option.
    • mvnOptions

      public Map<String,MavenOption> mvnOptions()
      Gets a map client option name to Maven Option.
      Returns:
      a map client option name to Maven Option.
    • markdownEscape

      public String markdownEscape(String text)
      Escapes a string for markdown.
      Parameters:
      text - the text to escape.
      Returns:
      the text with the markdown specific characters escaped.
    • aptEscape

      public String aptEscape(String text)
      Escapes a string for APT (almost plain text).
      Parameters:
      text - the text to escape.
      Returns:
      the text with the APT specific characters escaped.
    • argumentTypes

      public List<OptionCollection.ArgumentType> argumentTypes()
      Gets the list of argument types.
      Returns:
      a list of argument types.
    • matchers

      public Set<Matcher> matchers()
      Gets the set of Matchers.
      Returns:
      the set of Matchers.
    • standardCollections

      public List<StandardCollection> standardCollections()
      Gets the list of standard collections.
      Returns:
      the list of standard collections.
    • styleSheets

      public List<StyleSheets> styleSheets()
      Gets the list of stylesheets.
      Returns:
      the list of stylesheets.
    • stringUtils

      public org.apache.commons.lang3.StringUtils stringUtils()
      Gets the StringUtils object in order to work with it in Velocity templates.
      Returns:
      the org.apache.commons.lang3 StringUtils object.
      See Also:
      • StringUtils
    • tab

      public String tab()
      Gets a tab character.
      Returns:
      the tab character.
    • doubleLine

      public String doubleLine()
      Gets two new lines.
      Returns:
      a string containing two new lines.
    • licenseProperties

      public List<Description> licenseProperties()
      Gets a list of license property descriptions.
      Returns:
      a list of license property descriptions.
    • licenses

      public List<License> licenses()
      Gets the list of defined licenses.
      Returns:
      the list of defined licenses.
    • pad

      public String pad(int length)
      Creates a string of spaces of the specified length.
      Parameters:
      length - the length of the string.
      Returns:
      a string of spaces of the specified length.