Top Description Inners Fields Constructors Methods
com.thoughtworks.xstream.converters.collections

public Class TreeSetConverter

extends CollectionConverter
Class Inheritance
Imports
com.thoughtworks.xstream.converters.MarshallingContext, .UnmarshallingContext, com.thoughtworks.xstream.converters.reflection.ObjectAccessException, com.thoughtworks.xstream.core.JVM, com.thoughtworks.xstream.core.util.Fields, .PresortedSet, com.thoughtworks.xstream.io.HierarchicalStreamReader, .HierarchicalStreamWriter, com.thoughtworks.xstream.mapper.Mapper, java.lang.reflect.Field, java.util.AbstractList, .Comparator, .Map, .SortedMap, .SortedSet, .TreeMap, .TreeSet

Converts a java.util.TreeSet to XML, and serializes the associated java.util.Comparator. The converter assumes that the elements in the XML are already sorted according the comparator.
Authors
Joe Walnes, Jörg Schaible

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private transient TreeMapConverter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
marshal(Object
The object to be marshalled.
source
,
HierarchicalStreamWriter
A stream to write to.
writer
,
MarshallingContext
A context that allows nested objects to be processed by XStream.
context
)

Overrides com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal.

Implements com.thoughtworks.xstream.converters.Converter.marshal.

Convert an object to textual data.
private Object
public Object
Inherited from com.thoughtworks.xstream.converters.collections.CollectionConverter:
addCurrentElementToCollectioncanConvertcreateCollectionpopulateCollectionpopulateCollection

Field Detail

treeMapConverterback to summary
private transient TreeMapConverter treeMapConverter

Constructor Detail

TreeSetConverterback to summary
public TreeSetConverter(Mapper mapper)

Method Detail

marshalback to summary
public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context)

Overrides com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal.

Implements com.thoughtworks.xstream.converters.Converter.marshal.

Doc from com.thoughtworks.xstream.converters.Converter.marshal.

Convert an object to textual data.

Parameters
source:Object

The object to be marshalled.

writer:HierarchicalStreamWriter

A stream to write to.

context:MarshallingContext

A context that allows nested objects to be processed by XStream.

readResolveback to summary
private Object readResolve()
unmarshalback to summary
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context)

Overrides com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal.

Implements com.thoughtworks.xstream.converters.Converter.unmarshal.

Doc from com.thoughtworks.xstream.converters.Converter.unmarshal.

Convert textual data back into an object.

Parameters
reader:HierarchicalStreamReader

The stream to read the text from.

Returns:Object

The resulting object.

com.thoughtworks.xstream.converters.collections back to summary

private Class TreeSetConverter.Reflections

extends Object
Class Inheritance
  • java.lang.Object
  • com.thoughtworks.xstream.converters.collections.TreeSetConverter.Reflections

Field Summary

Modifier and TypeField and Description
private static final Object
private static final Field

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

constantValueback to summary
private static final Object constantValue
sortedMapFieldback to summary
private static final Field sortedMapField

Constructor Detail

Reflectionsback to summary
private Reflections()