I have a class that extends generic class that also extends (another) generic class.
class B<TypeB> extends C{}
class C<TypeC>{}
and now my probl开发者_StackOverflow社区ems is how to specify the TypeC when creating class A should be something like:
class A extends B<Type1><C<Type2>>
but the above actually does not compile.
Your decl of B
should be:
class B<TB, TC> extends C<TC> {
}
and your target will be
class A extends B<ConcreteB, ConcreteC> {
}
精彩评论