docs: @SuppressWarnings("unchecked")
      private static <T> Class<T> getGenericType(Class<?> thisClass)
      {
          Type type = thisClass;
          do
          {
              type = ((Class<?>)type).getGenericSuperclass();
              if (type instanceof ParameterizedType)
              {
                  return (Class<T>)((ParameterizedType)type).getActualTypeArguments()[0];
              }
          }
          while (type instanceof Class<?> && !type.equals(AbstractFormatter.class));
  
          return (Class<T>)Object.class;
      }