private ClassMap findInterfaceMapping(Class<?> destClass, Class<?> srcClass, String mapId) {
        // Use object array for keys to avoid any rare thread synchronization issues
        // while iterating over the custom mappings.
        // See bug #1550275.
        Object[] keys = classMappings.keySet().toArray();
        for (Object key : keys) {
            ClassMap map = classMappings.get(key);
            Class<?> mappingDestClass = map.getDestClassToMap();
            Class<?> mappingSrcClass = map.getSrcClassToMap();

            if ((mapId == null && map.getMapId() != null) || (mapId != null && !mapId.equals(map.getMapId()))) {
                continue;
            }

            if (isInterfaceImplementation(srcClass, mappingSrcClass)) {
                if (isInterfaceImplementation(destClass, mappingDestClass)) {
                    return map;
                } else if (destClass.equals(mappingDestClass)) {
                    return map;
                }
            }

            // Destination could be an abstract type. Picking up the best concrete type to use.
            if ((destClass.isAssignableFrom(mappingDestClass) && isAbstract(destClass))
                || (isInterfaceImplementation(destClass, mappingDestClass))) {
                if (MappingUtils.getRealClass(srcClass, beanContainer).equals(mappingSrcClass)) {
                    return map;
                }
            }

        }
        return null;
    }
Internal class that determines the appropriate class mapping to be used for
the source and destination object being mapped. Only intended for internal
use.
core/src/main/java/com/github/dozermapper/core/classmap/ClassMappings.java