If you want to know which particular mB method (of all those called "mB" in your extensive array of classes) is called by m1, you need more than just an AST. You need a complete character table that maps each character to possible definitions that match it.
The process of computing such a symbol table is difficult for many languages ββand very difficult for Java (but not as bad as for C ++). Someone has to code the rules for how an identifier is looked up before (local) areas, inheritance, overloads, implied drops, etc. And the Java reference manual devotes a significant part of its content trying to explain it. You do not want to do it yourself.
What you really need is a complete Java interface that has both AST and corresponding symbol tables for each method that you want to test. You can get this, I think, from interfaces to the (Sun?) Java compiler (I personally donβt know how to do this), from the Jikes compiler, from the Eclipse Java AST module (?), And from tools like our Java Front End . Another approach is to process class files containing method calls in the JVM form, with recommendations that all JVM commands have built using a character table.
If you want to calculate the m1 calls, then the ma calls the mQ .... mZ calls, you need a tool that is ready to read in the entire source code database right away. Compilers will not do this for you, but you can use Eclipse or our interface to do this.
source share