Class EnumCodecProvider

  • All Implemented Interfaces:

    public class EnumCodecProvider
    extends Object
    implements org.bson.codecs.configuration.CodecProvider
    Defines a CodecProvider for Enum values
    • Constructor Detail

      • EnumCodecProvider

        public EnumCodecProvider()
    • Method Detail

      • get

        public <T> org.bson.codecs.Codec<T> get​(Class<T> type,
                                                org.bson.codecs.configuration.CodecRegistry registry)
        Looks up the codec for the type
        Specified by:
        get in interface org.bson.codecs.configuration.CodecProvider
        Type Parameters:
        T - the type of the enum
        type - the type to look up
        registry - the registry to use
        the codec if found or null