docs: public final static Type[] getGenericTypes(Class<?> c) {
  
          Class<?> myClass = c;
  
          if (!(c.getGenericSuperclass() instanceof ParameterizedType)) {
              myClass = c.getSuperclass();
          }
  
          Type superClass = myClass.getGenericSuperclass();
          ParameterizedType type = (ParameterizedType) superClass;
          return type.getActualTypeArguments();
      }