static BeanFactoryId register(Class<?> clazz, Set<String> pathParams,
                                  List<RequestObjectResolver> objectResolvers,
                                  DependencyInjector dependencyInjector) {
        lock.lock();
        try {
            final BeanFactoryId beanFactoryId = new BeanFactoryId(clazz, pathParams);
            final AnnotatedBeanFactories annotatedBeanFactories = factories.get(clazz);
            if (!annotatedBeanFactories.containsKey(beanFactoryId.pathParams)) {
                final AnnotatedBeanFactory<?> factory =
                        createFactory(beanFactoryId, objectResolvers, dependencyInjector);
                if (factory != null) {
                    annotatedBeanFactories.put(beanFactoryId.pathParams, factory);
                    logger.debug("Registered a bean factory: {}", beanFactoryId);
                } else {
                    annotatedBeanFactories.put(beanFactoryId.pathParams, unsupportedBeanFactory);
                }
            }
            return beanFactoryId;
        } finally {
            lock.unlock();
        }
    }
Returns a {@link BeanFactoryId} of the specified {@link Class} and {@code pathParams} for finding its
factory from the factory cache later.
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedBeanFactoryRegistry.java