Package io.github.qishr.cascara.common.util
Class AbstractLibraryScanner
java.lang.Object
io.github.qishr.cascara.common.util.AbstractLibraryScanner
Direct Known Subtypes:
ClassPath, ModulePath
public abstract class AbstractLibraryScanner
Field Summary
| Modifier and Type | Field | Description |
|---|---|---|
| protected static final String | DOT_CLASS | |
| protected static final String | DOT_JAR | |
| protected static final String | MODULE_INFO | |
| protected Set |
classNames | |
| protected Set |
excluded | |
| protected Reporter | reporter | |
| protected Path | virtualReferencePath |
Constructor Summary
| Constructor | Description |
|---|---|
| AbstractLibraryScanner() |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| protected abstract void | addModuleDescriptor(String moduleName, ModuleDescriptor descriptor) | |
| protected abstract void | addModuleLocation(String moduleName, Path path) | |
| protected abstract void | addClassToModule(String className, String moduleName) | |
| public Set<String> | getClasses() | |
| protected static Set<String> | pathSet(String classPath) | |
| protected String | scanJar(Path path, String moduleName) | |
| protected String | scanDirectory(Path directory, String moduleName) | |
| protected boolean | isExcluded(String className) | |
| protected void | addClass(String className) | |
| protected abstract String | scanDirectoryUrl(Path directory, URL[] urls, String moduleName) | |
| public String | scanClassFile(Path directory, Path file, URLClassLoader classLoader, String moduleName, Set<String> discovered) | |
| protected void | error(Throwable t) |
Field Details
DOT_CLASS
protected static final String DOT_CLASS
See Also:
DOT_JAR
protected static final String DOT_JAR
See Also:
MODULE_INFO
protected static final String MODULE_INFO
See Also:
classNames
protected Set
excluded
protected Set
reporter
protected Reporter reporter
virtualReferencePath
protected Path virtualReferencePath
Method Details
addModuleDescriptor
protected abstract void addModuleDescriptor(String moduleName, ModuleDescriptor descriptor)
addModuleLocation
protected abstract void addModuleLocation(String moduleName, Path path)
addClassToModule
protected abstract void addClassToModule(String className, String moduleName)
getClasses
public Set<String> getClasses()
pathSet
protected static Set<String> pathSet(String classPath)
scanJar
@io.github.qishr.cascara.common.annotation.Nullable
protected String scanJar(Path path, String moduleName)
scanDirectory
protected String scanDirectory(Path directory, String moduleName)
isExcluded
protected boolean isExcluded(String className)
addClass
protected void addClass(String className)
scanDirectoryUrl
protected abstract String scanDirectoryUrl(Path directory, URL[] urls, String moduleName)
scanClassFile
public String scanClassFile(Path directory, Path file, URLClassLoader classLoader, String moduleName, Set<String> discovered)
Throws:
error
protected void error(Throwable t)