Class AbstractCodec<P,​I,​X extends Exception>

  • Type Parameters:
    P - Product type
    I - Input type
    X - Error exception type
    All Implemented Interfaces:
    Codec<P,​I,​X>, Deserializer<I,​P,​X>, Serializer<P,​I,​X>
    Direct Known Subclasses:
    AbstractUncheckedCodec

    @Beta
    @NonNullByDefault
    @Deprecated(since="7.0.9",
                forRemoval=true)
    public abstract class AbstractCodec<P,​I,​X extends Exception>
    extends Object
    implements Codec<P,​I,​X>
    Deprecated, for removal: This API element is subject to removal in a future version.
    An abstract base class enforcing nullness contract around Codec interface.
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractCodec()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
    • Constructor Detail

      • AbstractCodec

        public AbstractCodec()
        Deprecated, for removal: This API element is subject to removal in a future version.
    • Method Detail

      • deserialize

        public final @NonNull I deserialize​(@NonNull P input)
                                     throws X extends Exception
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: Deserializer
        Produce an object base on input.
        Specified by:
        deserialize in interface Codec<P,​I,​X extends Exception>
        Specified by:
        deserialize in interface Deserializer<P,​I,​X extends Exception>
        Parameters:
        input - Input object
        Returns:
        Product derived from input
        Throws:
        X - when input is not valid
        X extends Exception
      • serialize

        public final @NonNull P serialize​(@NonNull I input)
                                   throws X extends Exception
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: Serializer
        Convert an input into a product.
        Specified by:
        serialize in interface Codec<P,​I,​X extends Exception>
        Specified by:
        serialize in interface Serializer<P,​I,​X extends Exception>
        Parameters:
        input - Input
        Returns:
        A product
        Throws:
        X - when input is not valid
        X extends Exception
      • deserializeImpl

        protected abstract @NonNull I deserializeImpl​(@NonNull P product)
                                               throws X extends Exception
        Deprecated, for removal: This API element is subject to removal in a future version.
        Throws:
        X extends Exception
      • serializeImpl

        protected abstract @NonNull P serializeImpl​(@NonNull I input)
                                             throws X extends Exception
        Deprecated, for removal: This API element is subject to removal in a future version.
        Throws:
        X extends Exception