Package com.mongodb
Class Jep395RecordCodecProvider
java.lang.Object
com.mongodb.Jep395RecordCodecProvider
- All Implemented Interfaces:
CodecProvider
A CodecProvider for Java Records.
Delegates to
org.bson.codecs.record.RecordCodecProvider
.
If neither the runtime supports java.lang.Record
, which was introduced in Java SE 17,
nor org.bson.codecs.record.RecordCodecProvider
is available,
provides null
.- Since:
- 4.6
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> Codec<T>
get
(Class<T> clazz, List<Type> typeArguments, CodecRegistry registry) <T> Codec<T>
get
(Class<T> clazz, CodecRegistry registry) boolean
This method is not part of the public API and may be removed or changed at any time.
-
Constructor Details
-
Jep395RecordCodecProvider
public Jep395RecordCodecProvider()
-
-
Method Details
-
get
- Specified by:
get
in interfaceCodecProvider
-
get
- Specified by:
get
in interfaceCodecProvider
-
hasRecordSupport
@VisibleForTesting(otherwise=PRIVATE) public boolean hasRecordSupport()This method is not part of the public API and may be removed or changed at any time.- Returns:
- true if records are supported
-