public static function getCodeGenerators($entityClass = null)
    {
        if ($entityClass) {
            if (!isset(self::$generators[$entityClass])) {
                throw new \Exception("There is no registered entity code generator for class $entityClass");
            }

            return self::$generators[$entityClass];
        } else {
            return self::$generators;
        }
    }