QDoxJava文档解析器
QDox是一种高速,小型代码分析器,用于从Java源文件提取类/接口/方法的文档@标签。它是设计用来作为一个代码生成器和文档的工具。
代码示例:
// Reading a single source file.
builder.addSource(new FileReader("MyFile.java"));
// Reading from another kind of input stream.
builder.addSource(new StringReader("package test; public class Hello {}"));
// Adding all .java files in a source tree (recursively).
builder.addSourceTree(new File("mysrcdir"));
// Get the ClassLibrary
ClassLibrary lib = builder.getClassLibrary();
// Add a custom ClassLoader
lib.addClassLoader(myCustomClassLoader);
// Ant example : add the <classpath> element's contents
lib.addClassLoader(new AntClassLoader(getProject(), classpath));
评论