MethodTree java 6 Compiler Tree API
Given a method name and the Class name where the method is defined, is it possible to construct the MethodTree without creating the ClassTree, The reason why I want to do in this way is , I am doing a static analysis on the java source code,whenever I encounter a method invocation I need to visit that method wherever it is defined and proceed on, Currently I generate the AST for all the classes and then I start visiting a method at a time which is kind of not necessary since I don t want to parse all the classes and all t开发者_开发问答he methods within it.
figured out that it is not possible to generate a methodtree for a specific method without the class tree.need to have the class tree generated and obtain the necessary method tree.
精彩评论