Package dev.morphia.mapping.codec
Class EnumCodecProvider
- java.lang.Object
-
- dev.morphia.mapping.codec.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 Summary
Constructors Constructor Description EnumCodecProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> org.bson.codecs.Codec<T>
get(Class<T> type, org.bson.codecs.configuration.CodecRegistry registry)
Looks up the codec for the type
-
-
-
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 interfaceorg.bson.codecs.configuration.CodecProvider
- Type Parameters:
T
- the type of the enum- Parameters:
type
- the type to look upregistry
- the registry to use- Returns:
- the codec if found or null
-
-