docs: private static Type findGenericInterface(Class<?> sourceClass, Class<?> targetBaseInterface) {
          for (int i = 0; i < sourceClass.getInterfaces().length; i++) {
              Class<?> inter = sourceClass.getInterfaces()[i];
              if (inter == targetBaseInterface) {
                  return sourceClass.getGenericInterfaces()[0];
              } else {
                  Type deeper = findGenericInterface(inter, targetBaseInterface);
                  if (deeper != null) {
                      return deeper;
                  }
              }
          }
          return null;
      }