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 文件并将类名和方法保存在具有某些格式的单词(.docx)文件中(某些单词需要加粗/缩进等)。有什么好的工具或库可以用来做同样的事情吗?谢谢!
java.lang.reflect用于获取类名和方法名。
java.io.FileOutputStream用于写入文件。
java.awt.Font用于使某些字符加粗/缩进。
我建议使用 JavaParser 从 Java 代码中提取您需要的所有信息。它是一个成熟的产品,拥有相当大的社区,可以完成工作。
https://github.com/javaparser/javaparser