@Override public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { super.marshal(((Hash)source).core,writer,context); } }
@Override public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { super.marshal(((Tree)source).core,writer,context); } }
@Override public boolean canConvert(Class type) { return super.canConvert(type) || type==CopyOnWriteArrayList.class || type==CopyOnWriteArraySet.class; }
public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { SortedMap sortedMap = (SortedMap) source; marshalComparator(sortedMap.comparator(), writer, context); super.marshal(source, writer, context); }
public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { SortedSet sortedSet = (SortedSet) source; treeMapConverter.marshalComparator(sortedSet.comparator(), writer, context); super.marshal(source, writer, context); }
@Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { return ImmutableSet.copyOf((List) super.unmarshal(reader, context)); }
protected void populateCollection(HierarchicalStreamReader reader, UnmarshallingContext context, Collection collection) { populateCollection(reader, context, collection, collection); }
protected void populateMap(HierarchicalStreamReader reader, UnmarshallingContext context, Map map) { populateMap(reader, context, map, map); }
@Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { return ImmutableMap.copyOf((Map)super.unmarshal(reader, context)); }
public TreeSetConverter(Mapper mapper) { super(mapper, TreeSet.class); readResolve(); }
protected Object createCollection(Class type) { return super.createCollection(this.type != null ? this.type : type); } }
@Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { TreeMap tm = (TreeMap) super.unmarshal(reader,context); return new Tree(tm,tm.comparator()); }
/** * @deprecated As of 1.4.11 use {@link #readBareItem(HierarchicalStreamReader, UnmarshallingContext, Object)} or * {@link #readCompleteItem(HierarchicalStreamReader, UnmarshallingContext, Object)} instead. */ protected Object readItem(final HierarchicalStreamReader reader, final UnmarshallingContext context, final Object current) { return readBareItem(reader, context, current); }
/** * Write an item of the collection into the writer including surrounding tags. * * @param item the item to write * @param context the current marshalling context * @param writer the target writer * @since 1.4.11 */ protected void writeCompleteItem(final Object item, final MarshallingContext context, final HierarchicalStreamWriter writer) { writeItem(item, context, writer); }
@Override public boolean canConvert(Class type) { return super.canConvert(type); }
@Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { return ImmutableSortedSet.copyOf((List) super.unmarshal(reader, context)); }
@Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { return PackedMap.of((Map)super.unmarshal(reader, context)); } }
protected Object createCollection(Class type) { return super.createCollection(this.type != null ? this.type : type); } }
@Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { // CopyOnWriteArrayList used to serialize as custom serialization, // so read it in a compatible fashion. String s = reader.getAttribute("serialization"); if(s!=null && s.equals("custom")) { return sc.unmarshal(reader,context); } else { return super.unmarshal(reader, context); } }
@Override public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { return new Hash((Map) super.unmarshal(reader,context)); }