Calling super's super method

前端 未结 3 2102
慢半拍i
慢半拍i 2021-02-07 10:11

Is is possible to do something like super.super in the overriden method? That is, to bypass the direct parent\'s super and call \"grandparent\'s\" super?

3条回答
  •  遇见更好的自我
    2021-02-07 11:06

    Considering this is breaking one of the principles of OOP (encapsulation), I dearly hope it isn't possible. Even the case of you trying to do this speaks of a problem with your design.

提交回复
热议问题