public ClassMap createDefaultClassMap(Configuration globalConfiguration, Class<?> srcClass, Class<?> destClass, Boolean shouldGenerateMapping) {
        DozerClass srcDozerClass = new DozerClass(srcClass.getName(), srcClass, globalConfiguration.getBeanFactory(), null, null, null,
                                                  null, globalConfiguration.getMapNull(), globalConfiguration.getMapEmptyString(), false, null, beanContainer);

        DozerClass destDozerClass = new DozerClass(destClass.getName(), destClass, globalConfiguration.getBeanFactory(), null, null, null,
                                                   null, globalConfiguration.getMapNull(), globalConfiguration.getMapEmptyString(), false, null, beanContainer);

        ClassMap classMap = new ClassMap(globalConfiguration);
        classMap.setSrcClass(srcDozerClass);
        classMap.setDestClass(destDozerClass);

        if (shouldGenerateMapping) {
            generateMapping(classMap, globalConfiguration, buildTimeGenerators);
        }

        return classMap;
    }
Builds new default mapping on-the-fly for previously unknown mapped class pairs.

@param globalConfiguration configuration of Dozer
@param srcClass            type to convert from
@param destClass           type to convert to
@return information about the classes being mapped
core/src/main/java/com/github/dozermapper/core/classmap/ClassMapBuilder.java