Enum Class ResourcePrefix
- All Implemented Interfaces:
Serializable
,Comparable<ResourcePrefix>
,Constable
An enumeration of
Resource
prefixes
recognized by the Spring Framework.- Since:
- 1.3.1
- See Also:
-
Resource
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResourcePrefix
Factory method used to try and find aResourcePrefix
enumerated value matching the givenprefix
.Gets the network protocol that thisResourcePrefix
represents.protected String
toString()
Gets theResourcePrefix
as a prefix use in aURL
.static ResourcePrefix
Returns the enum constant of this class with the specified name.static ResourcePrefix[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CLASSPATH_URL_PREFIX
-
FILESYSTEM_URL_PREFIX
-
HTTP_URL_PREFIX
-
-
Field Details
-
RESOURCE_PATH_SEPARATOR
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
from
Factory method used to try and find aResourcePrefix
enumerated value matching the givenprefix
.- Parameters:
prefix
-String
with the name of the prefix.- Returns:
- a
ResourcePrefix
matching the givenprefix
by name, or null if theprefix
does not match anyResourcePrefix
enumerated value.
-
getProtocol
Gets the network protocol that thisResourcePrefix
represents.- Returns:
- the network protocol that this
ResourcePrefix
represents.
-
getUrlPrefixPattern
- Returns:
- the
pattern
or template used to construct aURL
prefix from thisResourcePrefix
. - See Also:
-
toString
- Overrides:
toString
in classEnum<ResourcePrefix>
-
toUrlPrefix
Gets theResourcePrefix
as a prefix use in aURL
.- Returns:
- the
URL
prefix. - See Also:
-