Package org.bson.codecs.pojo
Interface PropertyCodecRegistry
-
public interface PropertyCodecRegistry
A variant ofCodecRegistry
that generates codecs forPojoCodec
.This is a specialized codec registry that retrieves codecs which account for type parameters associated with a property. In particular this should only be used to add support for custom container types like optionals. It's only applicable for use by
PojoCodec
registered throughPojoCodecProvider.builder()
.- Since:
- 3.6
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> Codec<T>
get(TypeWithTypeParameters<T> type)
Gets aCodec
for the given Class.
-
-
-
Method Detail
-
get
<T> Codec<T> get(TypeWithTypeParameters<T> type)
Gets aCodec
for the given Class.- Type Parameters:
T
- the class type- Parameters:
type
- the Class associated type parameters for this property for which to get a Codec- Returns:
- a codec for the given class
- Throws:
CodecConfigurationException
- if the registry does not contain a codec for the given class.
-
-