Class DefaultResourceLocator

java.lang.Object
com.bc.ceres.core.ResourceLocator
com.bc.ceres.core.DefaultResourceLocator

public class DefaultResourceLocator extends ResourceLocator
The default resource locator. Locates resources using the current context class loader. Can be easily subclassed by overriding getResourceClassLoader() in order to return an appropriate class loader.
  • Field Details

    • LOG

      public static final Logger LOG
  • Constructor Details

    • DefaultResourceLocator

      public DefaultResourceLocator()
  • Method Details

    • locateResources

      public Collection<Path> locateResources(String name)
      Description copied from class: ResourceLocator
      Locates all resources with the given name.
      Specified by:
      locateResources in class ResourceLocator
      Parameters:
      name - The resource name
      Returns:
      The collection of all resources located
    • getResourceClassLoader

      protected ClassLoader getResourceClassLoader()
      The default implementation returns the context class loader.
      Returns:
      the class loader used to load resources.
    • toPath

      protected Path toPath(URI uri) throws IOException
      Throws:
      IOException