public final class ClassPathScanner extends Object
fromPrescan(DrillConfig)
The DrillConfig provides:
- the list of packages to scan. (drill.classpath.scanning.packages) IMPLEMENTATIONS_SCAN_PACKAGES
- the list of base classes to scan for implementations. (drill.classpath.scanning.base.classes) IMPLEMENTATIONS_SCAN_CLASSES
- the list of annotations to scan for. (drill.classpath.scanning.annotations) IMPLEMENTATIONS_SCAN_ANNOTATIONS
Only the class directories and jars containing a drill-module.conf will be scanned.
Drill core packages are scanned at build time and the result is saved in a JSON file.
At runtime only the locations that have not been scanned yet will be scanned.Modifier and Type | Field and Description |
---|---|
static String |
IMPLEMENTATIONS_SCAN_CACHE
Configuration pathname to turn off build time caching.
|
Constructor and Description |
---|
ClassPathScanner() |
Modifier and Type | Method and Description |
---|---|
static Set<URL> |
forResource(String resourcePathname,
boolean returnRootPathname)
Gets URLs of any classpath resources with given resource pathname.
|
static ScanResult |
fromPrescan(DrillConfig config) |
static Collection<URL> |
getConfigURLs(String resourcePathName) |
public static final String IMPLEMENTATIONS_SCAN_CACHE
public static Collection<URL> getConfigURLs(String resourcePathName)
public static Set<URL> forResource(String resourcePathname, boolean returnRootPathname)
resourcePathname
- resource pathname of classpath resource instances
to scan for (relative to specified class loaders' classpath roots)returnRootPathname
- whether to collect classpath root portion of
URL for each resource instead of full URL of each resourcepublic static ScanResult fromPrescan(DrillConfig config)
Copyright © 1970 The Apache Software Foundation. All rights reserved.