public function newToConstructor(
        \ReflectionClass $class,
        string $name,
        InjectionPoints $injectionPoints = null,
        \ReflectionMethod $postConstruct = null
    ) : Dependency {
        $setterMethods = $injectionPoints ? $injectionPoints($class->name) : new SetterMethods([]);
        $newInstance = new NewInstance($class, $setterMethods, new Name($name));

        return new Dependency($newInstance, $postConstruct);
    }