public void marshal (Object source, HierarchicalStreamWriter writer, MarshallingContext context)
{
Object collection = source;
if (source instanceof PersistentSortedSet) {
PersistentSortedSet col = (PersistentSortedSet) source;
col.forceInitialization();
collection = new TreeSet(((HashMap) col.getStoredSnapshot()).values());
}
super.marshal(collection, writer, context);
}