Class IndexAwareScanner
java.lang.Object
cloud.opencode.base.classloader.index.IndexAwareScanner
Index-Aware Scanner - Filters classes from a pre-built ClassIndex by package prefix
索引感知扫描器 - 按包前缀从预构建的 ClassIndex 中过滤类
Provides fast, in-memory scanning of a ClassIndex without loading classes
or touching the filesystem. This is the primary consumer of the index at runtime.
提供对 ClassIndex 的快速内存扫描,无需加载类或访问文件系统。
这是运行时索引的主要消费者。
Security | 安全性:
- Thread-safe: Yes (stateless) - 线程安全: 是 (无状态)
- Since:
- JDK 25, opencode-base-classloader V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionscan(ClassIndex index, String basePackage) Scan the index for all class names under the given base package 扫描索引中给定基础包下的所有类名scan(ClassIndex index, String basePackage, Predicate<ClassIndexEntry> filter) Scan the index for class names under the given base package that match the filter 扫描索引中给定基础包下匹配过滤器的类名
-
Method Details
-
scan
Scan the index for all class names under the given base package 扫描索引中给定基础包下的所有类名- Parameters:
index- the class index to scan | 要扫描的类索引basePackage- the base package prefix (e.g. "com.example") | 基础包前缀- Returns:
- set of fully qualified class names matching the package | 匹配包的完全限定类名集合
-
scan
public static Set<String> scan(ClassIndex index, String basePackage, Predicate<ClassIndexEntry> filter) Scan the index for class names under the given base package that match the filter 扫描索引中给定基础包下匹配过滤器的类名- Parameters:
index- the class index to scan | 要扫描的类索引basePackage- the base package prefix (e.g. "com.example") | 基础包前缀filter- predicate to filter entries | 过滤条目的谓词- Returns:
- set of fully qualified class names matching the package and filter | 匹配包和过滤器的完全限定类名集合
-