I need to write a crawler to find sample java class,method and field usage. So I need a parser to parse a java source file (parsing of source code in incomplete form is much more better of course!) and return used classes, methods, fields in it.
public void methodName() { String s = new String("Test"); int x = s.lastIndexOf("st"); }
In this example, I want to get that String
class is used, its String(String)
constructor and its lastIndexOf(String)
method are called.