convert(item, converter);
}
protected void convert(final Object item, final Converter converter) {
if (parentObjects.containsId(item)) {
final ConversionException e = new CircularReferenceException("Recursive reference to parent object");
e.add("item-type", item.getClass().getName());
e.add("converter-type", converter.getClass().getName());
throw e;
}
parentObjects.associateId(item, "");
converter.marshal(item, writer, this);
parentObjects.removeId(item);