Class FileResourceLoader<S>
java.lang.Object
fr.ens.biologie.genomique.eoulsan.util.AbstractResourceLoader<S>
fr.ens.biologie.genomique.eoulsan.util.FileResourceLoader<S>
- Type Parameters:
S- Type of the data to load
- All Implemented Interfaces:
ResourceLoader<S>
This class allow to define a resource loader for files.
- Since:
- 2.0
- Author:
- Laurent Jourdren
-
Constructor Summary
ConstructorsConstructorDescriptionFileResourceLoader(Class<S> clazz, DataFile resourcePath) Public constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResourcePath(DataFile resourcePath) Add a resource path.voidaddResourcePaths(Collection<String> resourcePaths) Add a resource paths.voidreload()Reload the list of available resources.booleanremoveResourcePath(DataFile resourcePath) Add a resource path.Methods inherited from class fr.ens.biologie.genomique.eoulsan.util.AbstractResourceLoader
loadAllResources, loadResources
-
Constructor Details
-
FileResourceLoader
Public constructor.- Parameters:
clazz- the Class type of the resource to loadresourcePath- the path to the resource to load
-
-
Method Details
-
reload
public void reload()Description copied from interface:ResourceLoaderReload the list of available resources. -
addResourcePaths
Add a resource paths.- Parameters:
resourcePaths- the resource path to add
-
addResourcePath
Add a resource path.- Parameters:
resourcePath- the resource path to add
-
removeResourcePath
Add a resource path.- Parameters:
resourcePath- the resource path to remove- Returns:
- true if the resource has been successfully removed
-