code: private static void populateSuperTypeArgs(final Type[] types, final Map<TypeVariable<?>, Type> map,
        boolean depthFirst) {
      for (Type type : types) {
        if (type instanceof ParameterizedType) {
          ParameterizedType parameterizedType = (ParameterizedType) type;
          if (!depthFirst)
            populateTypeArgs(parameterizedType, map, depthFirst);
          Type rawType = parameterizedType.getRawType();
          if (rawType instanceof Class)
            populateSuperTypeArgs(((Class<?>) rawType).getGenericInterfaces(), map, depthFirst);
          if (depthFirst)
            populateTypeArgs(parameterizedType, map, depthFirst);
        } else if (type instanceof Class) {
          populateSuperTypeArgs(((Class<?>) type).getGenericInterfaces(), map, depthFirst);
        }
      }
    }
docs: Populates the {@code map} with with variable/argument pairs for the given {@code types}.