protected Mapper getMappingProcessor() {
log.info("OpenL Mapper Framework v. 1.1.13-SNAPSHOT (Dozer 5.3.2)");
if (initializing.compareAndSet(false, true)) {
try {
loadCustomMappings();
eventManager = new DozerEventManager(eventListeners);
} finally {
ready.countDown();
}
}
try {
ready.await();
} catch (InterruptedException e) {
log.error("Thread interrupted: ", e);
}
Mapper processor = new MappingProcessor(customMappings, globalConfiguration, cacheManager, statsMgr,
customConverters, eventManager, getCustomFieldMapper(), customConvertersWithId, mappingConditions,
mappingConditionsWithId, collectionItemDiscriminators, collectionItemDiscriminatorsWithId);
if (statsMgr.isStatisticsEnabled()) {
processor = (Mapper) Proxy.newProxyInstance(processor.getClass().getClassLoader(), processor.getClass()
.getInterfaces(), new StatisticsInterceptor(processor, statsMgr));
}
return processor;
}