public class ClassPathScanner extends Object implements ResourceAndClassScanner
| 构造器和说明 |
|---|
ClassPathScanner(ClassLoader classLoader)
Creates a new Classpath scanner.
|
| 限定符和类型 | 方法和说明 |
|---|---|
List<Class<?>> |
scanForClasses(Location location,
ClassFilter predicate)
Scans the classpath for concrete classes under the specified package implementing this interface.
|
List<Resource> |
scanForResources(Location path,
ResourceFilter predicate)
Scans the classpath for resources under the specified location, starting with the specified prefix and ending with
the specified suffix.
|
public ClassPathScanner(ClassLoader classLoader)
classLoader - The ClassLoader for loading migrations on the classpath.public List<Resource> scanForResources(Location path, ResourceFilter predicate)
ResourceAndClassScannerscanForResources 在接口中 ResourceAndClassScannerpath - The location in the classpath to start searching. Subdirectories are also searched.predicate - The predicate used to match the resource names.public List<Class<?>> scanForClasses(Location location, ClassFilter predicate)
ResourceAndClassScannerscanForClasses 在接口中 ResourceAndClassScannerlocation - The location (package) in the classpath to start scanning.
Subpackages are also scanned.predicate - The predicate used to match against scanned classes.Copyright © 2019. All rights reserved.