I want to write a refactoring tool for the Java programming language.
For this reason I need to do structural queries against the abstract syntax tree. Given this AST how do I get answers to the following statements:
- Get superclasses of an object.
- Give me the expression where I call a method x() on type XClass
- Is method x() is called without arguments (check overloading)
- Is method x() called anywhere in the execution path of object of type XClass (eg. is close() called anywhere)