eclipse-查看继承层次图继承实现层次图

xiaoxiao2021-02-28  99

阅读代码时,如果想要看某个类继承了哪些类、实现了哪些接口、哪些类继承了这个类,恰巧这个类的继承实现结构又比较复杂,那么如果对开发工具不是很熟练,这个需求是比较难以实现的。eclipse中的type hierarchy可以满足这个需求。本文以Spring源码中的ClassPathResource.java为例。

quick type hierarchy

quick type hierarchy可以显示出类的继承结构,包括它的父类和子类

supertype hierarchy

supertype hierarchy可以显示出类的继承和实现结构,包括它的父类和实现的接口

打开后是这样的,默认和quick type hierarchy效果是相同的

点击按钮切换到【show the supertype hierarchy】切换到

subtype hierarchy

subtype hierarchy可以显示出类的子类。

点击按钮切换到【show the subtype hierarchy】

转载请注明原文地址: https://www.6miu.com/read-26510.html

最新回复(0)