org.sonar.l10n.java.rules.squid.MaximumInheritanceDepth.html Maven / Gradle / Ivy
Inheritance is certainly one of the most valuable concepts in object-oriented programming.
It's a way to compartmentalize and reuse code by creating collections of attributes and behaviors called classes which can be based on previously created classes.
But abusing of this concept by creating a deep inheritance tree can lead to very complex and unmaintainable source code.
Most of the time a too deep inheritance tree is due to bad object oriented design which has led to systematically use 'inheritance' when 'composition' would suit better.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy