private static Object objectFactory(String destObjClass, BeanContainer beanContainer) {
        String objectFactoryClassName = destObjClass.substring(0, destObjClass.lastIndexOf(".")) + ".ObjectFactory";
        if (objectFactory == null || objectFactoryClass == null || !objectFactoryClass.getCanonicalName().equals(objectFactoryClassName)) {
            objectFactoryClass = MappingUtils.loadClass(objectFactoryClassName, beanContainer);
            objectFactory = ReflectionUtils.newInstance(objectFactoryClass);
        }

        return objectFactory;
    }
Returns a new instance of ObjectFactory, or the cached one if previously created.

@param destObjClass type to convert to
@return instance of ObjectFactory
core/src/main/java/com/github/dozermapper/core/converters/JAXBElementConverter.java