Call Hierarchy of a method programatically not using eclipse shortcut

135 views Asked by At

I saw a similar post from one of the page of stackoverflow

Using Search Engine to implement call hierarchy (getting all the methods that invoke a certain method) in Java/eclipse

But the code on usage holds a method findMethod. What is type in that method argument. Please suggest a code having that argument value.

IMethod m = findMethod(type, "world");
Set<IMethod> methods = new HashSet<IMethod>();
methods = callGen.getCallersOf(m);
for (Iterator<IMethod> i = methods.iterator(); i.hasNext();)
{
    System.out.println(i.next().toString());
}
0

There are 0 answers