/** * Registers a reusable mechanism to obtain a {@link IndexedRecordConverter} for a specific class of object and * makes it available to the {@link #createIndexedRecordConverter(Class)} method. * * @param datumClass The class of the object that the {@link IndexedRecordConverter} knows how to wrap. * @param converterClass A class that can take a datum and wrap it into a valid IndexedRecord. */ protected <DatumT, ConverterT extends IndexedRecordConverter<? super DatumT, ?>> void registerIndexedRecordConverter( Class<DatumT> datumClass, Class<ConverterT> converterClass) { mapSharedIndexedRecordConverter.put(datumClass, new LambdaCreateANewInstanceSupplier<>(datumClass, converterClass)); }