首页 > 解决方案 > 不使用 Eclipse 快捷方式以编程方式调用方法的层次结构

问题描述

我从stackoverflow的一个页面中看到了类似的帖子

在Java/eclipse中使用Search Engine实现调用层次结构(获取调用某个方法的所有方法)

但是关于用法的代码包含一个方法findMethod。该方法参数中的类型是什么。请建议一个具有该参数值的代码。

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());
}

标签: javacall-hierarchy

解决方案


推荐阅读