docs: @SuppressWarnings("unchecked")
    public static <BASE, FROM extends BASE, TO extends BASE> Class<TO> uglyCrossCast(Class<FROM> cls, Class<BASE> base) {
      if(!base.isAssignableFrom(cls)) {
        throw cls == null ? new ClassCastException("Attempted to use 'null' as class.") : new ClassCastException(cls.getName() + " is not a superclass of " + base);
      }
      return (Class<TO>) cls;
    }