javaparser

    0熱度

    1回答

    JavaParser是一個java源代碼解析工具。我閱讀文檔,但發現只能解析一個完整的Java類的來源,如: public class X { public void show(String id) { Question q = Quesiton.findById(id); aaa.BBB.render(q); } } 但我想分析只是其中的一部分,

    6熱度

    3回答

    使用JavaParser類我可以用得到我的方法和字段列表: //List of all methods System.out.println("Methods: " + this.toString()); List<TypeDeclaration> types = n.getTypes(); for (TypeDeclaration type : types) { List<Bo