Class TypeResolvingCodecFactory

java.lang.Object
org.jdbi.v3.core.codec.CodecFactory
org.jdbi.v3.guava.codec.TypeResolvingCodecFactory
All Implemented Interfaces:
QualifiedArgumentFactory, QualifiedArgumentFactory.Preparable, QualifiedColumnMapperFactory

@Alpha @ThreadSafe public class TypeResolvingCodecFactory extends CodecFactory
An extended CodecFactory which can resolve Codecs for subtypes. This allows registering e.g. a codec for Set<String> and using any subtype of Set which the same type parameters (e.g. a HashSet<String<) will find the right codec.

This is an experimental feature which relies on TypeToken from the Guava library.

  • Constructor Details

    • TypeResolvingCodecFactory

      public TypeResolvingCodecFactory(Map<QualifiedType<?>,​Codec<?>> codecMap)
      Create a new TypeResolvingCodecFactory.
  • Method Details