* @param bootstrap
* @param archives
* @return the "flat" bean deployment archive
*/
public static <T extends BeanDeploymentArchive> WeldBeanDeploymentArchive merge(CDI11Bootstrap bootstrap, Iterable<T> archives) {
BeansXml mergedBeansXml = new BeansXmlParser().mergeExisting(archives, true);
Set<String> beanClasses = new HashSet<String>();
for (BeanDeploymentArchive archive : archives) {
beanClasses.addAll(archive.getBeanClasses());
}
return new WeldBeanDeploymentArchive(ManagerObjectFactory.FLAT_BEAN_DEPLOYMENT_ID, beanClasses, mergedBeansXml);