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>

public abstract class FileResourceLoader<S> extends AbstractResourceLoader<S>
This class allow to define a resource loader for files.
Since:
2.0
Author:
Laurent Jourdren
  • Constructor Details

    • FileResourceLoader

      public FileResourceLoader(Class<S> clazz, DataFile resourcePath)
      Public constructor.
      Parameters:
      clazz - the Class type of the resource to load
      resourcePath - the path to the resource to load
  • Method Details

    • reload

      public void reload()
      Description copied from interface: ResourceLoader
      Reload the list of available resources.
    • addResourcePaths

      public void addResourcePaths(Collection<String> resourcePaths)
      Add a resource paths.
      Parameters:
      resourcePaths - the resource path to add
    • addResourcePath

      public void addResourcePath(DataFile resourcePath)
      Add a resource path.
      Parameters:
      resourcePath - the resource path to add
    • removeResourcePath

      public boolean removeResourcePath(DataFile resourcePath)
      Add a resource path.
      Parameters:
      resourcePath - the resource path to remove
      Returns:
      true if the resource has been successfully removed