private static void collectActualTypeArguments(final Type[] genericInterfaces,
                                                   final Map<TypeVariable<?>, Type> map) {
        for (Type genericInterface : genericInterfaces) {
            if (genericInterface instanceof ParameterizedType) {
                ParameterizedType parameterizedType = (ParameterizedType)genericInterface;
                collectActualTypeArguments(parameterizedType, map);
                Type rawType = parameterizedType.getRawType();
                collectActualTypeArguments(getGenericInterfaces(rawType), map);

            } else {
                collectActualTypeArguments(getGenericInterfaces(genericInterface), map);
            }
        }
    }
collects all TypeVariable to Type mappings from the generic interfaces
core/src/main/java/com/github/dozermapper/core/util/TypeResolver.java