Interface Parameterizable


public interface Parameterizable
An interface indicating that a Codec is for a type that can be parameterized by generic types.
Since:
4.8
  • Method Summary

    Modifier and Type
    Method
    Description
    parameterize(CodecRegistry codecRegistry, List<Type> types)
    Recursively parameterize the codec with the given registry and generic type arguments.
  • Method Details

    • parameterize

      Codec<?> parameterize(CodecRegistry codecRegistry, List<Type> types)
      Recursively parameterize the codec with the given registry and generic type arguments.
      Parameters:
      codecRegistry - the code registry to use to resolve codecs for the generic type arguments
      types - the types that are parameterizing the containing type. The size of the list should be equal to the number of type parameters of the class whose codec is being parameterized, e.g. for a Collection the size of the list would be one since Collection has a single type parameter. Additionally, the size will never be 0 since there is no purpose in parameterizing a codec for a type that has no type parameters.
      Returns:
      the Codec parameterized with the given types