Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法通过插件收集Java类的信息?
我想收集信息,例如它所属的包、它拥有的导入、它是否有实现或扩展。
收集必要的信息后,打算将其复制到文本字段。
您可以使用 Eclipse JDT 插件收集属于 Java 项目的所有文件的信息。您也可以组合使用 Eclipse 的 AST 解析器。
JDT Core 组件是定义核心 Java 元素和 API 的插件。这个核心组件可以包含在我们自己的插件中,并且可以用于在 IDE 之外搜索、编译和操作 Java 代码。
您可以从这里找到启动教程。
您可以使用ASM库来解析类文件并从中提取任何信息。