Class EnumCodecProvider

  • All Implemented Interfaces:
    org.bson.codecs.configuration.CodecProvider

    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
        Parameters:
        type - the type to look up
        registry - the registry to use
        Returns:
        the codec if found or null