Interface ReferencingMarshallingContext

All Superinterfaces:
DataHolder, MarshallingContext

public interface ReferencingMarshallingContext extends MarshallingContext
A MarshallingContext that manages references.
Since:
1.4
  • Method Details

    • currentPath

      Path currentPath()
      Deprecated.
      As of 1.4.2
      Retrieve the current path.
      Returns:
      the current path
      Since:
      1.4
    • lookupReference

      Object lookupReference(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(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 - the original item to convert
      replacement - the replacement item that is converted instead
      Since:
      1.4
    • registerImplicit

      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 - the object that is implicit
      Since:
      1.4