ResourcesScanner
class ResourcesScanner<T>(var classLoader: ClassLoader = ResourcesScanner::class.java.classLoader) : Closeable(source)
通过 ClassLoader.getResource 加载符合匹配要求的内容。 扫描可能是项目根目录下的内容或者jar内的内容。
Author
ForteScarlet
Functions
Link copied to clipboard
fun <C : MutableCollection<T>> collect(allResources: Boolean, collection: C, classLoader: ClassLoader = this.classLoader): C
Link copied to clipboard
fun collectSequence(allResources: Boolean, classLoader: ClassLoader = this.classLoader): Sequence<T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
访问经由globs过滤后的资源。
Link copied to clipboard
fun <T> ResourcesScanner<T>.visitJarEntry(visitor: (JarEntry, URL) -> Sequence<T>): ResourcesScanner<T>
Link copied to clipboard
fun <T> ResourcesScanner<T>.visitPath(visitor: (ResourcesScanner.ResourceVisitValue.PathValue) -> Sequence<T>): ResourcesScanner<T>