Enum ResourceLoader
- All Implemented Interfaces:
Serializable, Comparable<ResourceLoader>, java.lang.constant.Constable
Implementations of strategies to load resources.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionLoad file from classpath.Load file from file system.Load file from HTTP url. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceLoaderFind loader according to given file pattern.Load given file path.static ResourceLoaderReturns the enum constant of this type with the specified name.static ResourceLoader[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CLASSPATH
Load file from classpath. -
FILE_SYSTEM
Load file from file system. -
URL
Load file from HTTP url.
-
-
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
-
load
Load given file path.- Parameters:
name- File path.- Returns:
- Loaded file.
- Throws:
DataSetLoaderException- If path cannot be loaded.
-
find
Find loader according to given file pattern.- Parameters:
value- File pattern.- Returns:
- Matched loader.
-