class SofaSpringContextSupport {

    public static SofaDefaultListableBeanFactory createBeanFactory(ClassLoader beanClassLoader,
                                                                   Supplier<SofaDefaultListableBeanFactory> supplier) {<FILL_FUNCTION_BODY>}

    public static SofaGenericApplicationContext createApplicationContext(SofaDefaultListableBeanFactory beanFactory,
                                                                         Function<SofaDefaultListableBeanFactory, SofaGenericApplicationContext> function) {
        SofaGenericApplicationContext ctx = function.apply(beanFactory);
        ctx.setClassLoader(beanFactory.getBeanClassLoader());
        return ctx;
    }
}

        SofaDefaultListableBeanFactory beanFactory = supplier.get();
        if (!(beanFactory.getAutowireCandidateResolver() instanceof QualifierAnnotationAutowireCandidateResolver)) {
            beanFactory.setAutowireCandidateResolver(new QualifierAnnotationAutowireCandidateResolver());
        }
        beanFactory.setParameterNameDiscoverer(new DefaultParameterNameDiscoverer());
        beanFactory.setBeanClassLoader(beanClassLoader);
        beanFactory.addPropertyEditorRegistrar(registry -> {
            registry.registerCustomEditor(Class.class, new ClassEditor(beanClassLoader));
            registry.registerCustomEditor(Class[].class, new ClassArrayEditor(beanClassLoader));
        });
        CachedIntrospectionResults.acceptClassLoader(beanClassLoader);
        return beanFactory;
    
<no_super_class>