Generics support for generated sublcasses