docs: private static Class<?> typeToClass(Type t)
    {
      if(t instanceof Class<?>) {
        return (Class<?>)t;
      }
      if(t instanceof ParameterizedType) {
        return (Class<?>)((ParameterizedType)t).getRawType();
      }
      throw new BugError("Unknown type %s to convert to class.", t);
    }