IDEA View the inheritance structure and relationship diagram of the class

IDEA related articles

title Article link
The most comprehensive IDEA manual for major manufacturers https://blog.csdn.net/chenlixiao007/article/details/106952976
Detailed explanation of IDEA projects and modules https://blog.csdn.net/chenlixiao007/article/details/108248475
IDEA creates Project and multiple Modules https://blog.csdn.net/chenlixiao007/article/details/108094767
Alibaba Java Development Coding Protocol and IDEA Integration https://blog.csdn.net/chenlixiao007/article/details/108287646

Preface

In the usual development process, we want to know the inheritance relationship of a class, such as which classes it inherits from? What interfaces does it implement? What are its subcategories? IDEA provides hierarchical structure (Hierarchy) and hierarchical diagram (Diagram).

1. Hierarchy

Select a class, or open a class, and then use the shortcut key Ctrl + H.

The following demonstrates opening the inheritance structure of the StringBuilder class.

Insert picture description here
Insert picture description here
Insert picture description here

2. Hierarchical relationship diagram (Diagram)

Select a class, or open a class 右键 Diagrams -> Show Diagram, or use the shortcut key Ctrl + Alt + U.

Insert picture description here

Of course, if 继承图太多it is possible 手动删除一些不必要的子图, it is convenient for us to observe the inheritance relationship we want more clearly.
Insert picture description here
The effect picture after deleting the Serializable sub-picture:
Insert picture description here

Of course, if you feel that the text or structure diagram is too small, you can also hold down Alt to have a magnifying glass function.
Insert picture description here

Guess you like

Origin blog.csdn.net/chenlixiao007/article/details/108504710