Interface Scanner

  • All Known Implementing Classes:
    ClassPathScanner

    public interface Scanner
    Scan a classpath directory for files and call visitor for each found file.

    The directory may reside in multiple locations (classpath, JAR directory, ...). All locations will be visited.

    Author:
    Jiri Bubnik
    • Method Detail

      • scan

        void scan​(ClassLoader classLoader,
                  String path,
                  ScannerVisitor visitor)
           throws IOException
        Scan all directories matching path (there might be multiple locations on classpath, JAR directory, ...) and call visitor for each found file.
        Parameters:
        classLoader - classloader to resolve path
        path - a '/'-separated path name that identifies the resource directory. Semantics same as ClassLoader.getResources(java.lang.String).
        visitor - visit each file on the path
        Throws:
        IOException - any IO exception while scanning