Map<TypeMappingInfo, JAXBContext.RootLevelXmlAdapter> typeMappingInfoToAdapters = new HashMap<TypeMappingInfo, JAXBContext.RootLevelXmlAdapter>();
for(Entry<TypeMappingInfo, Class> entry : typeMappingInfoToAdapterClasses.entrySet()) {
Class adapterClass = entry.getValue();
if(adapterClass != null) {
try {
XmlAdapter adapter = (XmlAdapter)adapterClass.newInstance();
Class boundType = getBoundTypeForXmlAdapterClass(adapterClass);
RootLevelXmlAdapter rootLevelXmlAdapter = new RootLevelXmlAdapter(adapter, boundType);
typeMappingInfoToAdapters.put(entry.getKey(), rootLevelXmlAdapter);
} catch(Exception ex) {}