code: private static void trackDependentVariables(final Class<?> type,
                                                  final Map<String, Type> tracedRootGenerics) {
          final TypeVariable<? extends Class<?>>[] typeParameters = type.getTypeParameters();
          if (tracedRootGenerics.isEmpty() || typeParameters.length == tracedRootGenerics.size()) {
              return;
          }
          final Map<String, TypeVariable> varsIndex = new HashMap<String, TypeVariable>();
          for (TypeVariable var : typeParameters) {
              varsIndex.put(var.getName(), var);
          }
  
          // find dependent generics - add to tracked - repeat with found only (cycle)
          final Map<String, Type> toCheck = new HashMap<String, Type>(tracedRootGenerics);
          final Map<String, Type> found = new HashMap<String, Type>();
          while (!toCheck.isEmpty()) {
              for (Map.Entry<String, Type> entry : toCheck.entrySet()) {
                  found.putAll(
                          matchVariables(varsIndex.get(entry.getKey()), entry.getValue(), tracedRootGenerics));
              }
  
              // repeat cycle with newly found generics
              toCheck.clear();
              toCheck.putAll(found);
              found.clear();
          }
      }
docs: Look if traced generics declarations contains other generics and so they could be resolved too.
  For example, in {@code class Root<P, K extends List<P>> extends Base<K>} knowing K we can recover P.
  <p>
  All additionally resolved generic variables will be directly added to provided traces list.
  
  @param type               type generics were tracked for
  @param tracedRootGenerics tracked generics