Top Description Methods
com.thoughtworks.xstream.core

public Interface ReferencingMarshallingContext

extends MarshallingContext
Imports
com.thoughtworks.xstream.converters.MarshallingContext, com.thoughtworks.xstream.io.path.Path

A MarshallingContext that manages references.
Author
Jörg Schaible
Since
1.4

Method Summary

Modifier and TypeMethod and Description
public Path

Returns:

the current path
currentPath
()

Deprecated As of 1.4.2
Retrieve the current path.
public Object

Returns:

the reference key or null
lookupReference
(Object
the item to lookup
item
)

Request the reference key for the given item

public void
registerImplicit(Object
the object that is implicit
item
)

Register an implicit element.

public void
replace(Object
the original item to convert
original
,
Object
the replacement item that is converted instead
replacement
)

Replace the currently marshalled item.

Inherited from com.thoughtworks.xstream.converters.MarshallingContext:
convertAnotherconvertAnother

Method Detail

currentPathback to summary
public Path currentPath()

Deprecated

As of 1.4.2

Retrieve the current path.

Returns:Path

the current path

Since
1.4
lookupReferenceback to summary
public Object lookupReference(Object item)

Request the reference key for the given item

Parameters
item:Object

the item to lookup

Returns:Object

the reference key or null

Since
1.4
registerImplicitback to summary
public void registerImplicit(Object item)

Register an implicit element. This is typically some kind of collection. Note, that this object may not be referenced anywhere else in the object stream.

Parameters
item:Object

the object that is implicit

Since
1.4
replaceback to summary
public void replace(Object original, Object replacement)

Replace the currently marshalled item.

Use this method only, if you know exactly what you do! It is a special solution for Serializable types that make usage of the writeReplace method where the replacing object itself is referenced.

Parameters
original:Object

the original item to convert

replacement:Object

the replacement item that is converted instead

Since
1.4