use TypeApply for generic methods of ObjectFactory