例如:
public class A<T> { public interface I<T> { //... } //... }
想在内部接口I中引用同一个类型参数T,如果做到?
人生最曼妙的风景,竟是内心的淡定与从容!
Look at thishttp://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.
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
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.
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