Package io.avaje.classpath.scanner.core
Class Scanner
- java.lang.Object
-
- io.avaje.classpath.scanner.core.Scanner
-
-
Constructor Summary
Constructors Constructor Description Scanner(ClassLoader classLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Class<?>>scanForClasses(Location location, io.avaje.classpath.scanner.ClassFilter predicate)Scans the classpath for classes under the specified package matching the given predicate.List<Class<?>>scanForClasses(String location, io.avaje.classpath.scanner.ClassFilter predicate)Scans the classpath for classes under the specified package matching the given predicate.List<io.avaje.classpath.scanner.Resource>scanForResources(Location location, io.avaje.classpath.scanner.ResourceFilter predicate)Scans this location for resources matching the given predicate.List<io.avaje.classpath.scanner.Resource>scanForResources(String location, io.avaje.classpath.scanner.ResourceFilter predicate)Scans this location for resources matching the given predicate.
-
-
-
Constructor Detail
-
Scanner
public Scanner(ClassLoader classLoader)
-
-
Method Detail
-
scanForResources
public List<io.avaje.classpath.scanner.Resource> scanForResources(Location location, io.avaje.classpath.scanner.ResourceFilter 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, io.avaje.classpath.scanner.ResourceFilter 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
public List<Class<?>> scanForClasses(Location location, io.avaje.classpath.scanner.ClassFilter predicate)
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
public List<Class<?>> scanForClasses(String location, io.avaje.classpath.scanner.ClassFilter predicate)
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
-
-