protected function getClassName(ContainerBuilder $container, $serviceId, $tagName)
    {
        $type = $container->getDefinition($serviceId);
        $interfaces = class_implements($type->getClass());

        if (\in_array(ObjectTypeExtensionInterface::class, $interfaces, true)) {
            throw new InvalidConfigurationException(sprintf('The service id "%s" must have the "class" parameter in the "%s" tag.', $serviceId, $tagName));
        }
        if (!\in_array(ObjectTypeInterface::class, $interfaces, true)) {
            throw new InvalidConfigurationException(sprintf('The service id "%s" must an instance of "%s"', $serviceId, 'Fxp\Component\DefaultValue\ObjectTypeInterface'));
        }

        return $this->buildInstanceType($type, $serviceId, $tagName)->getClass();
    }