Generics support for generated fragments