The SummaryInh metrics measure the "amount" of inheritance that takes place in a system. (For measurements relating to inheritance for individual modules see the ScalarInh metrics suite.) Specifically they measure the proportion of modules in the system that participate in an inheritance relationship, either Defined Using Inheritance (DUI) or being Inherited From (IF). This can be thought of as the degree to which the software engineer chose to use inheritance.
As with the ModuleCount metrics, the measurements can be broken down in different ways. In the case of DUI, modules can be distinguished according to where the parent module(s) come from, such as the standard library (SL), third party (TP), or user defined (UD). The kinds of the two modules at each end of an inheritance relationship can also be distinguished, such as class-extends-class (CC), class-implements-interface (CI), or interface-extends-interface (II). The nesting level of the module that is defined using inheritance can also be distinguished. See below for references for dicussions on the rationale for why these metrics might be useful.
This gives the following metrics.
Using (Defined Using Inheritance) | Used (Inherited From) | |
Class-Class | SLCCDUI, TPCCDUI, UDCCDUI | CCIF |
Class-Interface | SLCIDUI, TPCIDUI, UDCIDUI | CIIF |
Interface-Interface | SLIIDUI, TPIIDUI, UDIIDUI | IIIF |
Interace-Annotation | SLIADUI, TPIADUI, UDIADUI | IAIF |
Enum-Interface | SLEIDUI, TPEIDUI, UDEIDUI | EIIF |
Exception-Interface | SLExIDUI, TPExIDUI, UDExIDUI | ExIIF |
Exception-Exception | SLExExDUI, TPExExDUI, UDExExDUI | ExExIF |
Various potentially useful combinations can also be identified.
Ewan Tempero, James Noble and Hayden Melton 'How do Java Programs Use Inheritance? An Empirical Study of Inheritance in Java Software' 22nd European Conference on Object-Oriented Programming (ECOOP), Springer Berlin / Heidelberg Paphos, Cyprus. July 2008. pp. 667-691. [DOI] [Earlier TR]