class DefaultComponentDescriptorFactory implements ComponentDescriptorFactory {

    @Override
    public <T> ComponentDescriptor<T> make(final String componentName,
                                           final Class<T> componentType,
                                           final Supplier<T> componentSupplier,
                                           final boolean isSingleton) {

        final var classLoader = componentType.getClassLoader();
        final var version = getVersionFor(componentType, classLoader);

        final ComponentMetadata metadata = loadAnnotationComponentMetadata(componentType);

        var builder = new ComponentDescriptorBuilder<T>()
           .type(componentType)
           .supplier(componentSupplier)
           .metadata(metadata)
           .isSingleton(isSingleton)
           .order(extractComponentOrderFromMetadata(metadata))
           .configuration(extractComponentConfFromMetadata(metadata));

        if (version != null)
            builder.version(version);

        if (componentName != null)
            builder.name(componentName);
        else
            builder.name(componentNameGenerator.generate(builder));

        return builder.build();
    }

    public  DefaultComponentDescriptorFactory();

}