java.lang.Object
io.avaje.classpath.scanner.core.Scanner
- All Implemented Interfaces:
io.avaje.classpath.scanner.ClassPathScanner
Scanner for Resources and Classes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionscanForClasses(Location location, Predicate<Class<?>> predicate) Scans the classpath for classes under the specified package matching the given predicate.scanForClasses(String location, Predicate<Class<?>> predicate) Scans the classpath for classes under the specified package matching the given predicate.List<io.avaje.classpath.scanner.Resource>scanForResources(Location location, Predicate<String> predicate) Scans this location for resources matching the given predicate.List<io.avaje.classpath.scanner.Resource>scanForResources(String location, Predicate<String> predicate) Scans this location for resources matching the given predicate.
-
Constructor Details
-
Scanner
-
-
Method Details
-
scanForResources
public List<io.avaje.classpath.scanner.Resource> scanForResources(Location location, Predicate<String> predicate) Scans this location for resources matching the given predicate.The location can have a prefix of
filesystem:orclasspath:to determine how to scan. If no prefix is used then classpath scan is the default.- Parameters:
location- The location to start searching. Subdirectories are also searched.predicate- The predicate used to match resource names.- Returns:
- The resources that were found.
-
scanForResources
public List<io.avaje.classpath.scanner.Resource> scanForResources(String location, Predicate<String> predicate) Scans this location for resources matching the given predicate.The location can have a prefix of
filesystem:orclasspath:to determine how to scan. If no prefix is used then classpath scan is the default.- Specified by:
scanForResourcesin interfaceio.avaje.classpath.scanner.ClassPathScanner- Parameters:
location- The location to start searching. Subdirectories are also searched.predicate- The predicate used to match resource names.- Returns:
- The resources that were found.
-
scanForClasses
Scans the classpath for classes under the specified package matching the given predicate.- Parameters:
location- The package in the classpath to start scanning. Subpackages are also scanned.predicate- The predicate used to match scanned classes.- Returns:
- The classes found matching the predicate
-
scanForClasses
Scans the classpath for classes under the specified package matching the given predicate.- Specified by:
scanForClassesin interfaceio.avaje.classpath.scanner.ClassPathScanner- Parameters:
location- The package in the classpath to start scanning. Subpackages are also scanned.predicate- The predicate used to match scanned classes.- Returns:
- The classes found matching the predicate
-