Java exception class diagram?

Hi, I have terrible memory and I wanted to print a Java SE class diagram. Exceptional classes to hang it on the wall or something that I know. I do not need to remember her. It's just that when you are developing software or preparing for an exam, it is good to have such things around you.

I searched for most images that were not complete and of poor quality. So I was thinking about converting Javadocs to UML? then print uml maybe

Can someone help me?

+6
source share
5 answers

I don’t remember them either. When in eclipse I just use the built-in functions to display the hierarchy:

  • enter F4 into the class definition and display the hierarchy
  • type Ctrl + Shift + H , type the type you are looking for, and press enter. Again, he shows you the hierarchy
  • After the hierarchy is available in the "Hierarchy" view, you can filter, for example. using work sets.

This is not really the answer to your question, but it works great for me and for everyone that I talked about so far.

BTW: take a screenshot of the "Hierarchy" and this is the answer to your question :-)

+7
source

Some statistics from OpenJDK 7u3 rt.jar:

  • Throwable hierarchy: 785 classes
  • Error Hierarchy: 63 classes
  • Exception hierarchy: 730 classes
  • RuntimeException Hierarchy: 242 Classes

Thus, it is not possible to have a complete diagram. You probably won't use exceptions to the com.sun, org.omg subpackages or most javax. Usually you work on a subset of exceptions. I personally use the same approach as SJuan - looking for exceptions in one specific package or package subtree.

+2
source

You can convert your Java code to a UML class diagram. This could help to better understand the existing code. some tools handle Java quite well. Just go to Google with the following words: "Reverse engineering java eclipse" and you will get what you need.

0
source

The free Class Visualizer can do this for you - not as a diagram, but as a hierarchy tree. You can see part of the Throwable subtree in the screenshot on the Features project page. To get the desired result: load rt.jar into the tool, find “Throwable” in the hierarchical view and see hundreds of exceptions. If your application declares some exceptions, load it also into the tool - you will see them in the hierarchy.

0
source

Try going to the official java documentation and from the page below you can click any subclass, then a subclass of the subclass, and so on, until you find what you want.

http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html

0
source

Source: https://habr.com/ru/post/892948/


All Articles