BeansetModuleDefinition beanSetDefinition = (BeansetModuleDefinition) definition;
Map<String, Set<String>> overrides = beanSetDefinition.getOverrides();
ClassLoader classLoader = context.getClassLoader();
Properties properties = new BeanSetPropertiesReader().readBeanSetDefinition(classLoader, overrides);
final ConfigurableListableBeanFactory beanFactory = context.getBeanFactory();
final RecordingImportingBeanDefinitionDocumentReader documentReader = new RecordingImportingBeanDefinitionDocumentReader(properties);
XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(ModuleUtils.castToBeanDefinitionRegistry(beanFactory)){