Package com.mongodb
Class Jep395RecordCodecProvider
java.lang.Object
com.mongodb.Jep395RecordCodecProvider
- All Implemented Interfaces:
CodecProvider
A CodecProvider for Java Records.
Requires java.lang.Record support - eg Java 17 or greater.
- Since:
- 4.6
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> Codec<T>
get
(Class<T> clazz, CodecRegistry registry) boolean
-
Constructor Details
-
Jep395RecordCodecProvider
public Jep395RecordCodecProvider()
-
-
Method Details
-
get
- Specified by:
get
in interfaceCodecProvider
-
hasRecordSupport
@VisibleForTesting(otherwise=PRIVATE) public boolean hasRecordSupport()- Returns:
- true if records are supported
-