考虑:
public interface Foo<T> {
public static class X{}
public void foobar(T t);
}
public class Bar<X> {
Foo<X> foo = new Foo<X>() {
public void foobar(X t) {}
};
}
我没有办法表达我的意思是XfromBar<X>而不是Foo.X在foobar(X t)实现中。X除了在Bar或静态内部类 中重命名泛型参数之外,没有其他方法吗?