docs: private static Set<Class<?>> getAllExtendedOrImplementedTypesRecursively(Class<?> clazzArg) {
      Class<?> clazz = clazzArg;
      List<Class<?>> res = new ArrayList<Class<?>>();
  
      do {
        res.add(clazz);
  
        // First, add all the interfaces implemented by this class
        Class<?>[] interfaces = clazz.getInterfaces();
        if (interfaces.length > 0) {
          res.addAll(Arrays.asList(interfaces));
  
          for (Class<?> interfaze : interfaces) {
            res.addAll(getAllExtendedOrImplementedTypesRecursively(interfaze));
          }
        }
  
        // Add the super class
        Class<?> superClass = clazz.getSuperclass();
  
        // Interfaces does not have java,lang.Object as superclass, they have null, so break the cycle and return
        if (superClass == null) {
          break;
        }
  
        // Now inspect the superclass
        clazz = superClass;
      } while (!"java.lang.Object".equals(clazz.getCanonicalName()));
  
      return new HashSet<Class<?>>(res);
    }