Package com.thoughtworks.xstream.core
Class TreeMarshaller
- java.lang.Object
-
- com.thoughtworks.xstream.core.TreeMarshaller
-
- All Implemented Interfaces:
DataHolder,MarshallingContext
- Direct Known Subclasses:
AbstractReferenceMarshaller
public class TreeMarshaller extends java.lang.Object implements MarshallingContext
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTreeMarshaller.CircularReferenceException
-
Field Summary
Fields Modifier and Type Field Description protected ConverterLookupconverterLookupprivate DataHolderdataHolderprivate Mappermapperprivate ObjectIdDictionaryparentObjectsprotected HierarchicalStreamWriterwriter
-
Constructor Summary
Constructors Constructor Description TreeMarshaller(HierarchicalStreamWriter writer, ConverterLookup converterLookup, Mapper mapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconvert(java.lang.Object item, Converter converter)voidconvertAnother(java.lang.Object item)Converts another object searching for the default convertervoidconvertAnother(java.lang.Object item, Converter converter)Converts another object using the specified converterjava.lang.Objectget(java.lang.Object key)protected MappergetMapper()java.util.Iteratorkeys()private voidlazilyCreateDataHolder()voidput(java.lang.Object key, java.lang.Object value)voidstart(java.lang.Object item, DataHolder dataHolder)
-
-
-
Field Detail
-
writer
protected HierarchicalStreamWriter writer
-
converterLookup
protected ConverterLookup converterLookup
-
mapper
private Mapper mapper
-
parentObjects
private ObjectIdDictionary parentObjects
-
dataHolder
private DataHolder dataHolder
-
-
Constructor Detail
-
TreeMarshaller
public TreeMarshaller(HierarchicalStreamWriter writer, ConverterLookup converterLookup, Mapper mapper)
-
-
Method Detail
-
convertAnother
public void convertAnother(java.lang.Object item)
Description copied from interface:MarshallingContextConverts another object searching for the default converter- Specified by:
convertAnotherin interfaceMarshallingContext- Parameters:
item- the next item to convert
-
convertAnother
public void convertAnother(java.lang.Object item, Converter converter)Description copied from interface:MarshallingContextConverts another object using the specified converter- Specified by:
convertAnotherin interfaceMarshallingContext- Parameters:
item- the next item to convertconverter- the Converter to use
-
convert
protected void convert(java.lang.Object item, Converter converter)
-
start
public void start(java.lang.Object item, DataHolder dataHolder)
-
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
getin interfaceDataHolder
-
put
public void put(java.lang.Object key, java.lang.Object value)- Specified by:
putin interfaceDataHolder
-
keys
public java.util.Iterator keys()
- Specified by:
keysin interfaceDataHolder
-
lazilyCreateDataHolder
private void lazilyCreateDataHolder()
-
getMapper
protected Mapper getMapper()
-
-