问题描述
我需要分析 Java Spring Boot 应用程序中方法的调用层次结构。
IntelliJ IDEA 在我遇到时感到困惑:
我想获取 B.foo()
的调用层次结构,但我也获取 C.foo()
的所有调用者。
@Component
public class Caller1 {
@Autowired B b;
public void bar(){ b.foo()}
}
@Component
public class Caller2 {
@Autowired C c;
public void bar(){ c.foo()}
}
public interface I {
void foo();
}
public abstract class A implements I {
void foo(){..}
}
@Component
public B extends A {
@Override
void foo() {..}
}
@Component
public C extends A {
..
}
在 IntelliJ IDEA 中,B.foo()
的调用层次包括 Caller1.bar()
和 Caller2.bar()
。但我只想要 B.foo()
的调用者,例如 Caller1.bar()
。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)