Package com.thoughtworks.xstream.core
Interface ReferencingMarshallingContext
-
- All Superinterfaces:
DataHolder
,MarshallingContext
public interface ReferencingMarshallingContext extends MarshallingContext
AMarshallingContext
that manages references.- Since:
- 1.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Path
currentPath()
Deprecated.As of 1.4.2java.lang.Object
lookupReference(java.lang.Object item)
Request the reference key for the given itemvoid
registerImplicit(java.lang.Object item)
Register an implicit element.void
replace(java.lang.Object original, java.lang.Object replacement)
Replace the currently marshalled item.-
Methods inherited from interface com.thoughtworks.xstream.converters.DataHolder
get, keys, put
-
Methods inherited from interface com.thoughtworks.xstream.converters.MarshallingContext
convertAnother, convertAnother
-
-
-
-
Method Detail
-
currentPath
Path currentPath()
Deprecated.As of 1.4.2Retrieve the current path.- Returns:
- the current path
- Since:
- 1.4
-
lookupReference
java.lang.Object lookupReference(java.lang.Object item)
Request the reference key for the given item- Parameters:
item
- the item to lookup- Returns:
- the reference key or
null
- Since:
- 1.4
-
replace
void replace(java.lang.Object original, java.lang.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
- the original item to convertreplacement
- the replacement item that is converted instead- Since:
- 1.4
-
registerImplicit
void registerImplicit(java.lang.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
- the object that is implicit- Since:
- 1.4
-
-