Class ResourcepathDigger


public class ResourcepathDigger extends ClasspathDigger
This is the sister of the ClasspathDigger. It digs into the classpath to find resources and resource problems.
Since:
1.7.2 (26.05.2017)
Version:
$Revision: 1.5 $
Author:
oboehm
  • Field Details

  • Constructor Details

    • ResourcepathDigger

      public ResourcepathDigger()
      Instantiates a new digger for resources.
    • ResourcepathDigger

      public ResourcepathDigger(ClassLoader cloader)
      Instantiates a new digger for resources.
      Parameters:
      cloader - the classloder used for digging
  • Method Details

    • getResources

      public Set<String> getResources()
      Digs into the classpath and returns the found resources.
      Returns:
      resources of the classpath
    • whichResource

      public static URI whichResource(String name, ClassLoader cloader)
      Returns the URI of the given resource and the given classloader. If the resource is not found it will be tried again with/without a leading "/" and with the parent classloader.
      Parameters:
      name - resource name (e.g. "log4j.properties")
      cloader - class loader
      Returns:
      URI of the given resource (or null if resource was not found)