遇到个问题:怎么才能够让子类强制调用父类的方法?
例如:父类有个
[java] view plaincopy
/**
* 释放资源
*/
public void release() {
if (ui_WindowPlayer != null) {
ui_WindowPlayer.release();
ui_WindowPlayer = null;
}
if (mSubContainer != null) {
mSubContainer.release();
mSubContainer = null;
}
}
子类重写release时必须调用父类的release
[java] view plaincopy
@Override
public void release() {} {
super.release();
//
//
}
我想知道如何才能强制调用?换句话就是编译期就提醒调用。
------解决方案--------------------------------------------------------