Package org.apache.rat.configuration
Enum Format
- All Implemented Interfaces:
Serializable
,Comparable<Format>
An enumeration of the types of files that can contain the configuration
information.
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Format
Determine theFormat
from a File.static Format
Determine theFormat
from the file name.static Format
Determine theFormat
from a URL.static Format
Returns the enum constant of this type with the specified name.static Format[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
XML
an XML file -
TXT
A plain text file
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
matcherReader
- Returns:
- a new instance of MatcherReader for this format.
-
licenseReader
- Returns:
- a new instance of the LicenseReader for this format.
-
fromName
Determine theFormat
from the file name.- Parameters:
name
- the file name to check.- Returns:
- the Format
-
fromURL
Determine theFormat
from a URL.- Parameters:
url
- the URL to check.- Returns:
- the Format
-
fromFile
Determine theFormat
from a File.- Parameters:
file
- the File to check.- Returns:
- the Format
- Throws:
MalformedURLException
- in case the file cannot be found.
-