例如:
public class A<T> {
public interface I<T> {
//...
}
//...
}
想在内部接口I中引用同一个类型参数T,如果做到?
伊谢尔伦2017-04-17 13:15:40
Look at this
http://stackoverflow.com/questions/10963601/java-generics-non-static-type-variable-t-cannot-be-referenced-from-a-static-con
What you want may not be achievable. The key is to see what your purpose is and then think of individual ways to solve the problem.
迷茫2017-04-17 13:15:40
The T in this internal interface has nothing to do with your outer T. You just need to specify the same type when using it