* @throws XMLStreamException
* @throws IOException
*/
protected <T> void serializeCollection( @NotNull Iterable<? extends T> objects, @NotNull Class<T> type, @NotNull @NonNls String elementName, @NotNull XMLStreamWriter serializeTo, @NotNull Version formatVersion ) throws XMLStreamException, IOException {
AbstractXmlSerializer<? super T, XMLStreamWriter, XMLStreamReader, XMLStreamException> serializer = getSerializer( type );
Version resolvedVersion = getDelegatesMappings().resolveVersion( type, formatVersion );
for ( T object : objects ) {
serializeTo.writeStartElement( elementName );
serializer.serialize( serializeTo, object, resolvedVersion );
serializeTo.writeEndElement();