class ClientFactoryAnnotationBeanPostProcessor implements BeanPostProcessor, PriorityOrdered {

    private final ClientFactory clientFactory;

    public ClientFactoryAnnotationBeanPostProcessor(ClientFactory clientFactory) {
        this.clientFactory = clientFactory;
    }

    @Override
    public Object postProcessBeforeInitialization(final Object bean, String beanName)
                                                                                     throws BeansException {<FILL_FUNCTION_BODY>}

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

        ReflectionUtils.doWithFields(bean.getClass(), field -> {
            if (ClientFactory.class.isAssignableFrom(field.getType())) {
                ReflectionUtils.makeAccessible(field);
                ReflectionUtils.setField(field, bean, clientFactory);
            } else if ((clientFactory instanceof ClientFactoryImpl)
                       && ((ClientFactoryImpl) clientFactory).getAllClientTypes().contains(
                           field.getType())) {
                Object client = clientFactory.getClient(field.getType());

                ReflectionUtils.makeAccessible(field);
                ReflectionUtils.setField(field, bean, client);
            } else {
                throw new RuntimeException(ErrorCode.convert("01-02000"));
            }
        }, field -> !Modifier.isStatic(field.getModifiers())
               && field.isAnnotationPresent(SofaClientFactory.class));

        return bean;
    
<no_super_class>