Does such thing as dynamic inheritance exist in Java?
Just to clarify, by dynamic inheritance I mean: can I specify from what class I inherit certain class at runtime? (A inherits from { X | X ∈ {P, T, Q} })
I am just trying to understand what are my options if I need to implement, say, class Animal, which will have the following child classes: FlyingAnimal, WalkingAnimal, SwimmingAnimal, etc.
At the same time, I need to subdivide Animal into Humans and NonHumans, which will have slightly different behaviors. What I want to do is to derive Humans and NonHumans from Animal, and then derive Animal from Walkable, etc. - I want to decide which one it would be at the runtime (assuming that an animal can either walk, or fly).