假设我有以下内容:
public class TextField {
private String value = "";
public String getValue() { return value; }
}
And:
public class TextField2 extends TextField {
public String getValue() { return value; }
}
Eclipse中有什么办法可以搜索only的实例getValue()
在 TextField2 对象上调用的方法?我假设答案是否定的,但我想我会问。
You can do this by selecting the overriden method, pressing the key combination Ctrl+Shift+G. Or by selecting Search --> References --> Workspace from the menu. In the Search view that shows the result, click on the button with the arrow icon at the top right of the view and select References to Overriden.
但正如 @Sotirios 在评论中暗示的那样,这不会检测声明类型的变量的引用TextField
这可能是子类型的实例TextField2
在运行时。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)