Delegate class creation to the ObjectFactory