Interface IllegalArgumentCodec<S,D>

Type Parameters:
S - Serialized (external) type
D - Deserialized (internal) type
All Known Subinterfaces:
BinaryCodec<T>, BitsCodec<T>, BooleanCodec<T>, DataStringCodec<T>, DecimalCodec<T>, EmptyCodec<T>, EnumCodec<T>, IdentityrefCodec<T>, InstanceIdentifierCodec<T>, Int16Codec<T>, Int32Codec<T>, Int64Codec<T>, Int8Codec<T>, LeafrefCodec<T>, StringCodec<T>, Uint16Codec<T>, Uint32Codec<T>, Uint64Codec<T>, Uint8Codec<T>, UnionCodec<T>
All Known Implementing Classes:
AbstractDataStringCodec, AbstractIllegalArgumentCodec, AbstractIntegerStringCodec, AbstractModuleStringIdentityrefCodec, AbstractModuleStringInstanceIdentifierCodec, AbstractStringIdentityrefCodec, AbstractStringInstanceIdentifierCodec, AbstractStringUnionCodec, BinaryStringCodec, BitsStringCodec, BooleanStringCodec, DecimalStringCodec, EnumStringCodec, ModuleStringIdentityrefCodec, StringStringCodec, TypeDefinitionAwareCodec

@Beta public interface IllegalArgumentCodec<S,D>
Utility interface for translation between a external form and an internal form. Implementations should consider subclassing AbstractIllegalArgumentCodec.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull D
    deserialize(@NonNull S input)
    Produce an internal object based on an external object.
    @NonNull S
    serialize(@NonNull D input)
    Produce an external object based on an internal object.
  • Method Details

    • deserialize

      @NonNull D deserialize(@NonNull S input)
      Produce an internal object based on an external object.
      Parameters:
      input - Input object
      Returns:
      Product derived from input
      Throws:
      NullPointerException - if input is null
      IllegalArgumentException - when input is not valid
    • serialize

      @NonNull S serialize(@NonNull D input)
      Produce an external object based on an internal object.
      Parameters:
      input - Input
      Returns:
      An external form object
      Throws:
      NullPointerException - if input is null
      IllegalArgumentException - when input is not valid