public function generate($className, DependencyGraph $dependencyGraph)
    {
        $lastSeparatorPos = strrpos($className, '\\');
        if ($lastSeparatorPos !== false) {
            $namespace = substr($className, 0, $lastSeparatorPos);
            $shortClassName = substr($className, $lastSeparatorPos + 1);
        } else {
            $namespace = '';
            $shortClassName = $className;
        }

        $serviceDefinitions = [];
        foreach ($dependencyGraph->getAllObjects() as $object) {
            if (!$object->getValue()->isDynamic()) {
                $paramExprs = [];
                foreach ($object->getDependencies() as $dependency)  {
                    $paramExprs[] = $this->dumpParamExpr($dependency);
                }

                $serviceDefinitions[] = $this->dumpServiceDefinition($object, $paramExprs);
            }
        }

        return $this->dumpClass($namespace, $shortClassName, $serviceDefinitions);
    }