Package org.hotswap.agent.util.scanner
Interface Scanner
-
- All Known Implementing Classes:
ClassPathScanner
public interface ScannerScan 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidscan(ClassLoader classLoader, String path, ScannerVisitor visitor)Scan all directories matching path (there might be multiple locations on classpath, JAR directory, ...)
-
-
-
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 pathpath- a '/'-separated path name that identifies the resource directory. Semantics same asClassLoader.getResources(java.lang.String).visitor- visit each file on the path- Throws:
IOException- any IO exception while scanning
-
-