/** * Method for constructing a new instance with configuration that specifies what root name to use * for "root element wrapping". See {@link SerializationConfig#withRootName(String)} for details. * * <p>Note that method does NOT change state of this reader, but rather construct and returns a * newly configured instance. */ public ObjectWriter withRootName(String rootName) { SerializationConfig newConfig = _config.withRootName(rootName); return (newConfig == _config) ? this : new ObjectWriter(this, newConfig); }