public class Scanner extends Object implements ClassPathScanner
| 构造器和说明 |
|---|
Scanner(ClassLoader classLoader) |
| 限定符和类型 | 方法和说明 |
|---|---|
List<Class<?>> |
scanForClasses(Location location,
ClassFilter predicate)
Scans the classpath for classes under the specified package matching the given predicate.
|
List<Class<?>> |
scanForClasses(String location,
ClassFilter predicate)
Scans the classpath for classes under the specified package matching the given predicate.
|
List<Resource> |
scanForResources(Location location,
ResourceFilter predicate)
Scans this location for resources matching the given predicate.
|
List<Resource> |
scanForResources(String location,
ResourceFilter predicate)
Scans this location for resources matching the given predicate.
|
public Scanner(ClassLoader classLoader)
public List<Resource> scanForResources(Location location, ResourceFilter predicate)
The location can have a prefix of filesystem: or classpath: to determine
how to scan. If no prefix is used then classpath scan is the default.
location - The location to start searching. Subdirectories are also searched.predicate - The predicate used to match resource names.public List<Resource> scanForResources(String location, ResourceFilter predicate)
The location can have a prefix of filesystem: or classpath: to determine
how to scan. If no prefix is used then classpath scan is the default.
scanForResources 在接口中 ClassPathScannerlocation - The location to start searching. Subdirectories are also searched.predicate - The predicate used to match resource names.public List<Class<?>> scanForClasses(Location location, ClassFilter predicate)
location - The package in the classpath to start scanning. Subpackages are also scanned.predicate - The predicate used to match scanned classes.public List<Class<?>> scanForClasses(String location, ClassFilter predicate)
scanForClasses 在接口中 ClassPathScannerlocation - The package in the classpath to start scanning. Subpackages are also scanned.predicate - The predicate used to match scanned classes.Copyright © 2020. All rights reserved.