Enum Class SourceScheme
- All Implemented Interfaces:
Serializable,Comparable<SourceScheme>,Constable
Supported set of file resource and URL schemes that may be used to resolve a resource (e.g. source file).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic SourceSchemeTry to resolve source scheme from given file path URL.booleanisRemote()static StringIf any strip scheme prefix from given name.static SourceSchemeReturns the enum constant of this class with the specified name.static SourceScheme[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GIST
-
GITHUB
-
RAW_GITHUB
-
FILE
-
CLASSPATH
-
HTTP
-
HTTPS
-
UNKNOWN
-
-
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
-
isRemote
public boolean isRemote() -
fromUri
Try to resolve source scheme from given file path URL. Checks for special GIST and GITHUB endpoint URLs. By default, uses unknown scheme usually leads to loading resource from file system.- Parameters:
path-- Returns:
-
onlyName
If any strip scheme prefix from given name.- Parameters:
name-- Returns:
-