3
abstract method foo(E) in wtf.is.going.on cannot be accessed directly super.foo(e)
使用自動編譯我的項目時ANT
產生ANT
構建文件我得到這個錯誤從ANDROID
。抽象方法foo(E)不能直接super.foo(e)中訪問與ANT編譯
當我在ECLIPSE
編譯相同的項目,我沒有得到任何問題。發生什麼事?
這裏是正在發生的事情:
package wtf.is.going.on;
public interface DAOMutator<E> {
public void foo(E e);
}
package wtf.is.going.on;
public class DAOBImpl<E extends DAO> implements DAOMutator<E> {
@Override
public void foo(DAO dao) {
//do some stuff
}
}
package wtf.is.going.on.more;
public class VMBImpl <E extends someDao> extends DAOBImpl<E> {
@Override
public void foo(E e) {
super.foo(e); // ERROR OCCURS HERE
}
}
確切錯誤輸出:
[javac] MYPATH\src\wtf\is\going\on\more\VMBImpl.java:6: abstract method foo(E) in wtf.is.going.on.DAOMutator cannot be accessed directly
[javac] super.foo(e);
我的公共接口DAOMutator'也需要更改爲'public interface DAOMutator '。這解決了其他問題。 –
prolink007
2012-04-24 15:50:49
包名+1 = P – Windle 2012-04-24 16:04:32