private static Map<TypeVariable<?>, Type> getTypeMap(final Class<?> targetClass) {
        // check if a TypeMap already exists for this class
        if (typeMaps.containsKey(targetClass)) {
            return typeMaps.get(targetClass);
        }

        // build a new TypeVariable -> Type map
        Map<TypeVariable<?>, Type> map = new HashMap<>();
        Class<?> clazz = targetClass;

        while (!Object.class.equals(clazz)) {
            Type genericSuperClass = clazz.getGenericSuperclass();
            if (genericSuperClass instanceof ParameterizedType) {
                collectActualTypeArguments((ParameterizedType)genericSuperClass, map);
            }
            collectActualTypeArguments(clazz.getGenericInterfaces(), map);
            clazz = clazz.getSuperclass();
        }

        typeMaps.put(targetClass, map);
        return map;
    }
returns an already cached [TypeVariable to Type] map for the targetClass or build a new one.
core/src/main/java/com/github/dozermapper/core/util/TypeResolver.java