class RuntimeContextBeanFactoryPostProcessor implements BeanFactoryPostProcessor,
                                                   ApplicationContextAware, InitializingBean,
                                                   Ordered {

    protected BindingAdapterFactory                    bindingAdapterFactory;

    protected BindingConverterFactory                  bindingConverterFactory;

    protected SofaRuntimeManager                       sofaRuntimeManager;

    protected ApplicationContext                       applicationContext;

    protected SofaRuntimeAwareProcessor                sofaRuntimeAwareProcessor;

    protected ClientFactoryAnnotationBeanPostProcessor clientFactoryAnnotationBeanPostProcessor;

    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
                                                                                   throws BeansException {<FILL_FUNCTION_BODY>}

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.applicationContext = applicationContext;
        this.bindingAdapterFactory = applicationContext.getBean("bindingAdapterFactory",
            BindingAdapterFactory.class);
        this.bindingConverterFactory = applicationContext.getBean("bindingConverterFactory",
            BindingConverterFactory.class);
        this.sofaRuntimeManager = applicationContext.getBean("sofaRuntimeManager",
            SofaRuntimeManager.class);
    }

    @Override
    public int getOrder() {
        return HIGHEST_PRECEDENCE;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        this.sofaRuntimeAwareProcessor = new SofaRuntimeAwareProcessor(sofaRuntimeManager);
        this.clientFactoryAnnotationBeanPostProcessor = new ClientFactoryAnnotationBeanPostProcessor(
            sofaRuntimeManager.getClientFactoryInternal());
    }
}

        // make sure those BeanPostProcessor work on other BeanPostProcessor
        beanFactory.addBeanPostProcessor(sofaRuntimeAwareProcessor);
        beanFactory.addBeanPostProcessor(clientFactoryAnnotationBeanPostProcessor);

        // none singleton bean
        ReferenceAnnotationBeanPostProcessor referenceAnnotationBeanPostProcessor = new ReferenceAnnotationBeanPostProcessor(
            sofaRuntimeManager.getSofaRuntimeContext(), bindingAdapterFactory,
            bindingConverterFactory);
        referenceAnnotationBeanPostProcessor.setApplicationContext(applicationContext);
        beanFactory.addBeanPostProcessor(referenceAnnotationBeanPostProcessor);
    
<no_super_class>