Interface PropertyCodecRegistry


public interface PropertyCodecRegistry
A variant of CodecRegistry that generates codecs for PojoCodec.

This is a specialized codec registry that retrieves codecs which account for type parameters associated with a property. In particular this should only be used to add support for custom container types like optionals. It's only applicable for use by PojoCodec registered through PojoCodecProvider.builder().

Since:
3.6
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> Codec<T>
    Gets a Codec for the given Class.
  • Method Details

    • get

      <T> Codec<T> get(TypeWithTypeParameters<T> type)
      Gets a Codec for the given Class.
      Type Parameters:
      T - the class type
      Parameters:
      type - the Class associated type parameters for this property for which to get a Codec
      Returns:
      a codec for the given class
      Throws:
      CodecConfigurationException - if the registry does not contain a codec for the given class.