public enum Format extends Enum<Format>
Enum Constant and Description |
---|
TXT
A plain text file
|
XML
an XML file
|
Modifier and Type | Method and Description |
---|---|
static Format |
fromFile(File file)
Determine the
Format from a File. |
static Format |
fromName(String name)
Determine the
Format from the file name. |
static Format |
fromURL(URL url)
Determine the
Format from a URL. |
LicenseReader |
licenseReader() |
MatcherReader |
matcherReader() |
static Format |
valueOf(String name)
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.
|
public static final Format XML
public static final Format TXT
public static Format[] values()
for (Format c : Format.values()) System.out.println(c);
public static Format valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic MatcherReader matcherReader()
public LicenseReader licenseReader()
public static Format fromName(String name)
Format
from the file name.name
- the file name to check.public static Format fromURL(URL url)
Format
from a URL.url
- the URL to check.public static Format fromFile(File file) throws MalformedURLException
Format
from a File.file
- the File to check.MalformedURLException
- in case the file cannot be found.Copyright © 2006–2024 Apache Software Foundation. All rights reserved.