private Object convertCollectionInternal( Class<?> collectionClass, Type targetElementType, Iterable<?> sourceObject, Action<? super SourceObjectMapping> mapping) { Collection<Object> convertedElements = collectionMapper.createEmptyCollection(collectionClass); convertCollectionInternal(convertedElements, targetElementType, sourceObject, mapping); if (collectionClass.equals(DomainObjectSet.class)) { return new ImmutableDomainObjectSet(convertedElements); } else { return convertedElements; } }