3
abstract method foo(E) in wtf.is.going.on cannot be accessed directly super.foo(e)

使用ANT自动生成的ANT构建文件从ANDROID.

当我在 中编译同一个项目时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);
4

1 回答 1

3

如果你切换

public void foo(DAO dao)

在 DAOBImpl 中

public void foo(E dao)

它工作正常吗?

于 2012-04-24T15:23:03.283 回答