Is it possible to change the inheritance hierarchy of class objects at runtime with reflection?
My situation is I have:
SuperClass
MiddleClass extends SuperClass
BottomClass extends SuperClass
I would like to use reflection at runtime to change BottomClass to extend MiddleClass. Is this possible?
THanks
No, it’s not possible through reflection becuase reflection is used to analyze the existing code, not to change it.