@Nullable
    private static <T> AnnotatedBeanFactory<T> createFactory(BeanFactoryId beanFactoryId,
                                                             List<RequestObjectResolver> objectResolvers,
                                                             DependencyInjector dependencyInjector) {
        requireNonNull(beanFactoryId, "beanFactoryId");
        requireNonNull(objectResolvers, "objectResolvers");

        final int modifiers = beanFactoryId.type.getModifiers();
        if (Modifier.isAbstract(modifiers) || Modifier.isInterface(modifiers)) {
            // Only concrete classes can be handled.
            return null;
        }

        // Support request converters which are specified for a bean class. e.g.
        //
        // @RequestConverter(BeanConverterA.class)
        // @RequestConverter(BeanConverterB.class)
        // class CompositeBean {
        //     @RequestObject
        //     BeanA a;
        //     ...
        // }
        final List<RequestObjectResolver> resolvers = addToFirstIfExists(
                objectResolvers, AnnotationUtil.findDeclared(beanFactoryId.type, RequestConverter.class),
                dependencyInjector);

        final Entry<Constructor<T>, List<AnnotatedValueResolver>> constructor =
                findConstructor(beanFactoryId, resolvers, dependencyInjector);
        if (constructor == null) {
            // There is no constructor, so we cannot create a new instance.
            return null;
        }

        final List<AnnotatedValueResolver> constructorAnnotatedResolvers = constructor.getValue();

        // Find the methods whose parameters are not annotated with the same annotations in the constructor.
        // If there're parameters used redundantly, it would warn it.
        final Map<Method, List<AnnotatedValueResolver>> methods =
                findMethods(constructorAnnotatedResolvers, beanFactoryId, resolvers, dependencyInjector);

        // Find the fields which are not annotated with the same annotations in the constructor and methods.
        // If there're parameters used redundantly, it would warn it.
        final Map<Field, AnnotatedValueResolver> fields = findFields(
                constructorAnnotatedResolvers, methods, beanFactoryId, resolvers, dependencyInjector);

        if (constructor.getValue().isEmpty() && methods.isEmpty() && fields.isEmpty()) {
            // A default constructor exists but there is no annotated field or method.
            return null;
        }

        // Suppress Java language access checking.
        constructor.getKey().setAccessible(true);
        methods.keySet().forEach(method -> method.setAccessible(true));
        fields.keySet().forEach(field -> field.setAccessible(true));
        return new AnnotatedBeanFactory<>(beanFactoryId, constructor, methods, fields);
    }
Returns a factory of the specified {@link BeanFactoryId}.
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedBeanFactoryRegistry.java