getGenerator must be protected