Interface ObjectResolver

All Known Implementing Classes:
ChainingObjectResolver

public interface ObjectResolver
Resolver for substituting objects in a stream. The resolver is invoked on write before any serialization takes place.
  • Method Summary

    Modifier and Type
    Method
    Description
    readResolve(Object replacement)
    Get the original object for a replacement object read from a stream.
    writeReplace(Object original)
    Get a replacement for an object being written to a stream.
  • Method Details

    • readResolve

      Object readResolve(Object replacement)
      Get the original object for a replacement object read from a stream.
      Parameters:
      replacement - the replacement object
      Returns:
      the original
    • writeReplace

      Object writeReplace(Object original)
      Get a replacement for an object being written to a stream.
      Parameters:
      original - the original object
      Returns:
      the replacement