Skip to content

Commit

Permalink
feat: remove fieldreader factory interface and implementation
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
  • Loading branch information
otaviojava committed Jul 30, 2023
1 parent bba5533 commit 6867c5f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ class ClassConverter {

private FieldWriterFactory writerFactory;

private FieldReaderFactory readerFactory;

private InstanceSupplierFactory instanceSupplierFactory;

private ConstructorMetadataBuilder constructorMetadataBuilder;
Expand All @@ -52,7 +50,6 @@ class ClassConverter {
ClassConverter(Reflections reflections) {

this.reflections = reflections;
this.readerFactory = new ReflectionFieldReaderFactory(reflections);
this.writerFactory = new FieldWriterFactory(reflections);
this.instanceSupplierFactory = new ReflectionInstanceSupplierFactory(reflections);
this.constructorMetadataBuilder = new ConstructorMetadataBuilder(reflections);
Expand Down Expand Up @@ -186,7 +183,7 @@ private FieldMapping to(Field field) {

FieldMappingBuilder builder = new FieldMappingBuilder().withName(columnName)
.withField(field).withType(mappingType).withId(id)
.withReader(readerFactory.apply(field))
.withReader(bean -> reflections.getValue(bean, field))
.withWriter(writerFactory.apply(field));

if (nonNull(convert)) {
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 6867c5f

Please sign in to comment.