docs: @SuppressWarnings("unchecked")
    public <E,F extends E> F createInstance(Class<E> type, Object... params) {
      Object obj = createInstance(params);
      if (type.isInstance(obj)) {
        return (F) obj;
      } else {
        throw new ClassCreationException("Cannot cast " + classname
            + " into " + type.getName());
      }
    }