Top Description Inners Fields Constructors Methods
com.thoughtworks.xstream.core

public abstract Class AbstractReferenceMarshaller

extends TreeMarshaller
Class Inheritance
Known Direct Subclasses
com.thoughtworks.xstream.core.ReferenceByIdMarshaller, com.thoughtworks.xstream.core.ReferenceByXPathMarshaller
Imports
com.thoughtworks.xstream.converters.ConversionException, .Converter, .ConverterLookup, com.thoughtworks.xstream.core.util.ObjectIdDictionary, com.thoughtworks.xstream.io.HierarchicalStreamWriter, com.thoughtworks.xstream.io.path.Path, .PathTracker, .PathTrackingWriter, com.thoughtworks.xstream.mapper.Mapper, java.util.Iterator

Abstract base class for a TreeMarshaller, that can build references.
Authors
Joe Walnes, Jörg Schaible, Mauro Talevi
Since
1.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public static class

Field Summary

Modifier and TypeField and Description
private ObjectIdDictionary
private Path
private PathTracker
private ObjectIdDictionary
Inherited from com.thoughtworks.xstream.core.TreeMarshaller:
converterLookupwriter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
protected abstract String
createReference(Path currentPath, Object existingReferenceKey)

protected abstract Object
createReferenceKey(Path currentPath, Object item)

protected abstract void
fireValidReference(Object referenceKey)

Inherited from com.thoughtworks.xstream.core.TreeMarshaller:
convertAnotherconvertAnothergetgetMapperkeysputstart

Field Detail

implicitElementsback to summary
private ObjectIdDictionary implicitElements
lastPathback to summary
private Path lastPath
pathTrackerback to summary
private PathTracker pathTracker
referencesback to summary
private ObjectIdDictionary references

Constructor Detail

AbstractReferenceMarshallerback to summary
public AbstractReferenceMarshaller(HierarchicalStreamWriter writer, ConverterLookup converterLookup, Mapper mapper)

Method Detail

convertback to summary
public void convert(Object item, Converter converter)

Overrides com.thoughtworks.xstream.core.TreeMarshaller.convert.

createReferenceback to summary
protected abstract String createReference(Path currentPath, Object existingReferenceKey)
createReferenceKeyback to summary
protected abstract Object createReferenceKey(Path currentPath, Object item)
fireValidReferenceback to summary
protected abstract void fireValidReference(Object referenceKey)
com.thoughtworks.xstream.core back to summary

private Class AbstractReferenceMarshaller.Id

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private Object
private Path

Constructor Summary

AccessConstructor and Description
public
Id(Object item, Path path)

Method Summary

Modifier and TypeMethod and Description
protected Object
protected Path
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

itemback to summary
private Object item
pathback to summary
private Path path

Constructor Detail

Idback to summary
public Id(Object item, Path path)

Method Detail

getItemback to summary
protected Object getItem()
getPathback to summary
protected Path getPath()
com.thoughtworks.xstream.core back to summary

public Class AbstractReferenceMarshaller.ReferencedImplicitElementException

extends ConversionException
Class Inheritance

Deprecated

as a consequence of ConversionException being deprecated. See corresponding docs for further information.

Constructor Summary

AccessConstructor and Description
public

Constructor Detail

ReferencedImplicitElementExceptionback to summary
public ReferencedImplicitElementException(final Object item, final Path path)