Lorenz & Kidd
Mark Lorenz and Jeff Kidd catalogued a suite of object-oriented design metrics in their 1994 book "Object-Oriented Software Metrics: A Practical Guide" [1], covering class size, structure, and coupling. Understand implements the class-size measures from that suite.
Lorenz & Kidd Metrics¶
| Name | Acronym | Understand Metric ID |
|---|---|---|
| Number of Methods | NM | CountDeclMethodAll |
| Public Instance Methods | PIM | CountDeclMethodPublic |
| Number of Instance Methods | NIM | CountDeclInstanceMethod |
| Number of Class Methods | NCM | CountDeclClassMethod |
| Number of Class Variables | NCV | CountDeclClassVariable |
| Number of Instance Variables | NIV | CountDeclInstanceVariable |
| Number of Friends | NF | CountDeclMethodFriend |
| Average Method Size | AMS | AvgCountLineCode |
Notes:
- CountDeclMethodAll is also tagged as Chidamber & Kemerer's Response for a Class (RFC), since Lorenz & Kidd's Number of Methods and Chidamber & Kemerer's simplified RFC (ignoring the methods called by a class) count the same thing.
- CountDeclMethodFriend also goes by Number of Friend Methods (NFM) in Lorenz & Kidd's own naming.
- CountDeclMethodPublic also goes by Number of Public Methods (PM, NPM) in industry usage. Lorenz & Kidd's PIM counts public instance methods only; Understand's metric also includes public static/class methods.
References¶
- Lorenz, Mark, and Jeff Kidd. "Object-Oriented Software Metrics: A Practical Guide." Prentice Hall, 1994.
Lorenz & Kidd Plugins¶
| Name | Kind |
|---|---|
| All Methods | Metric |
| Average Code Lines | Metric |
| Class Methods | Metric |
| Class Variables | Metric |
| Friend Methods | Metric |
| Instance Methods | Metric |
| Instance Variables | Metric |
| Public Methods | Metric |