Similar to #4160, the FlatFileItemWriterBuilder can use the java.lang.Class#isRecord API to detect if the type of items is a record or a regular class and configure the right FieldExtractor accordingly (ie RecordFieldExtractor for records and BeanWrapperFieldExtractor for regular classes).
The goal of this issue is to implement this idea to make the configuration of the right FieldExtractor transparent to the user.