Generic classes with parameterized super class and interface
Hello.
I'm trying to write a generic class that looks like the following pseudo-code.
publicinterface Interface{
public Interface getSibling(...);
}
publicclass Klass{...}
publicclass MyKlass<Textends Klass, T2extends Interface>
extends Timplements T2{
public T2 getSibling(...){
returnthis;
}
}
where Interface and Klass each have various extensions.
I came across this problem, or challenge, while writing classes for testing my EJBs. I tried and failed various attempts.
Is it possible to write generic classes of this nature in Java?
If so, please tell me and others who are like me.
Thanks in advance.

