Are there any best practices regarding the maximum depth of the inheritance hierarchy for a framework and guidelines when to use multiple levels of inheritance or join them in a single class?
Some references to established practices/examples that worked well in the Java world would be nice in the answers as this is from the perspective of the community and frameworks surrounding Java.
You may be looking for a nice rule like “not more then 5 levels of inheritance” but I really doubt that there is such a rule. Objects usually model real world entities and the community of all those entities never agreed on a rule (as far as I know)…
One “best practice” is definitly: favor composition over inheritance. Following this guideline: define one interface and implementations with no further superclasses. All common fields and methods come with behaviour and strategies
On the other hand, we sometime model real world entities or structurs that already come with a deep hierarchy of entities. Classification of animals is one example or algebraic structures. A framework to model such existing structures would require a deep class hierarchy because it should follow the real world just to be understandable.