Can I override a hidden (but public) method and call its super method?

前端 未结 3 460
既然无缘
既然无缘 2020-12-20 13:06

There is a non public api that I need to override in order to workaround a quirk with Android\'s WebView.

The api is hidden but it is public:

/**
 *         


        
3条回答
  •  孤城傲影
    2020-12-20 13:44

    Is there anyway to override this method AND be able to call the super method?

    No, unfortunately, as is explained in the answer to the question How to call a superclass method using Java reflection you cannot solve this problem with reflection.

提交回复
热议问题