当我在Eclipse中编辑Java类时,当我的光标位于类变量上时,我可以执行Ctrl+ T以显示一个显示其所有父类和子类的弹出窗口.IntelliJ中的等价物是什么?
例:
Use|r user = new User();
Run Code Online (Sandbox Code Playgroud)
管道是我的光标.
java.lang.Class.getInterfaces返回所有直接实现的接口,即不遍历类树以获取所有父类型的所有接口.例如,层次结构
public interface A {}
public interface B {}
public interface C extends B {}
public class Foo implements A {} // Foo.class.getInterfaces() returns [A]
public class Bar implements C {} // Bar.class.getInterfaces() returns [C], note B is not included.
Run Code Online (Sandbox Code Playgroud)
因为Bar我想得到[B, C],但对于任意树深度.
我自己可以写这个,但我确定一个图书馆必须存在才能做到这一点,任何想法?