Enum Format

java.lang.Object
java.lang.Enum<Format>
org.apache.rat.configuration.Format
All Implemented Interfaces:
Serializable, Comparable<Format>

public enum Format extends Enum<Format>
An enumeration of the types of files that can contain the configuration information.
  • Enum Constant Details Link icon

    • XML Link icon

      public static final Format XML
      An XML file
    • TXT Link icon

      public static final Format TXT
      A plain text file
  • Method Details Link icon

    • values Link icon

      public static Format[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf Link icon

      public static Format valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • matcherReader Link icon

      public MatcherReader matcherReader()
      Returns:
      a new instance of MatcherReader for this format.
    • licenseReader Link icon

      public LicenseReader licenseReader()
      Returns:
      a new instance of the LicenseReader for this format.
    • from Link icon

      public static Format from(String name)
      Determine the Format from the file name.
      Parameters:
      name - the file name to check.
      Returns:
      the Format
    • from Link icon

      public static Format from(URI uri)
      Determine the Format from a URI.
      Parameters:
      uri - the URI to check.
      Returns:
      the Format
    • from Link icon

      public static Format from(File file)
      Determine the Format from a file.
      Parameters:
      file - the File to check.
      Returns:
      the Format