public function provide(Builder $builder, Frame $frame) : ServiceDefinition
    {
        $marker = $frame->getServiceAnnotation();

        if (! $marker instanceof Service) {
            throw new BuilderException("This provider can only handle {$this->handles()}");
        }

        $injection = $builder->buildInjectionForClass($frame->getClass(), $frame->getFactoryMethod());

        return new ServiceDefinition\DefaultService($frame->getClass()->getName(), $injection, $marker, $frame->getOptions());
    }
public function provide(Builder $builder, Frame $frame) : ServiceDefinition
    {
        $marker = $frame->getServiceAnnotation();

        if (! $marker instanceof Service) {
            throw new BuilderException("This provider can only handle {$this->handles()}");
        }

        $injection = $builder->buildInjectionForClass($frame->getClass(), $frame->getFactoryMethod());

        return new ServiceDefinition\DefaultService($frame->getClass()->getName(), $injection, $marker, $frame->getOptions());
    }
@param Builder $builder
@param Frame   $frame

@return ServiceDefinition

@throws BuilderException