Analyzing Class Inheritance

When reverse engineering the class design in C++ or Java software, one of major objectives is better understanding of the class inheritance. At the simpliest level, this begins with the class inheritance hierarchy. With the comprehensive source code analysis of Imagix 4D, you're able to pursue a deeper understanding of the design. Moving into a more detailed member level, you can quickly identify where the methods and data of the base class are reused, where they are extended and where they are modified (overridden).
One subset of the class inheritance views deals with basic class hierarchy. One of these views shows the hierarchy of base classes that are inherited by the focus class. A second starts at the focus class and indicates the hierarchy of classes that derive from it. In the Full Class Hierarchy, you see all the classes are either base classes or derived classes of the focus class.

The direction of the inheritance (blue lines) between the classes (pink triangles or diamonds) is shown by arrowheads.

Methods and data of a base class can be reused by inheriting them into a derived class. In the Inheritance from Base Classes view, the specifics of this are displayed in a UML Diagram. You learn which members of a class are inherited, and from where. At the same time, you get a sense of how much of the class functionality is inherited as opposed to be defined as client methods and data in the class itself. An equivalent view shows how the members of the focus class are inherited into its derived classes.

The reuse of client members from the base class on the left to become inherited members in the derived class on the right is shown by inheritance relationships (pink lines).

Class inheritance includes the ability to modify a base class method by overriding it, redefining it for use in the current class. In the Overrides of Class Functions view, you're able to see where members of the focus class are modified in derived classes. Here again, there is an equivalent view, showing how members of the focus class override methods defined in base classes.

Each row represents a level of class derivation (blue lines). Overrides (green lines) of individual methods is shown. (Full Size)

Used together, the Inheritance from/of views and the Overrides views provide a detailed analysis of the reuse, extension and modification of class members inherent in the design of classes in your software.

Analyzing Classes >
Class Inheritance