@Override GenericBuilderGetterAndFieldMapper getterAndfieldMapperGenericBuilder(final int i) { final MappingContextFactoryBuilder currentBuilder = builder.getMapperContextFactoryBuilder(propertyMeta, propertyMappings); SourceMapper<S, ?> mapper = getsSourceMapper(currentBuilder); Function<?, T> transform = null; if (mapper instanceof TransformSourceFieldMapper) { transform = ((TransformSourceFieldMapper) mapper).transform; mapper = ((TransformSourceFieldMapper) mapper).delegate; } ContextualGetter<S, Object> biFunction = builder.newMapperGetterAdapter(mapper, currentBuilder); FieldMapper<S, GenericBuilder<S, T>> fieldMapper = builder.newMapperFieldMapper(propertyMappings, new GenericBuilderSetter(i), mapper , currentBuilder); FieldMapper<S, T> fieldMapperAfterConstruct = builder.newMapperFieldMapper(propertyMappings, propertyMeta, mapper, currentBuilder); return new GenericBuilderGetterAndFieldMapper(biFunction, fieldMapper, transform, fieldMapperAfterConstruct); }
@Override GenericBuilderGetterAndFieldMapper getterAndfieldMapperGenericBuilder(final int i) { final MappingContextFactoryBuilder currentBuilder = builder.getMapperContextFactoryBuilder(propertyMeta, propertyMappings); SourceMapper<S, ?> mapper = getsSourceMapper(currentBuilder); Function<?, T> transform = null; if (mapper instanceof TransformSourceFieldMapper) { transform = ((TransformSourceFieldMapper) mapper).transform; mapper = ((TransformSourceFieldMapper) mapper).delegate; } ContextualGetter<S, Object> biFunction = builder.newMapperGetterAdapter(mapper, currentBuilder); FieldMapper<S, GenericBuilder<S, T>> fieldMapper = builder.newMapperFieldMapper(propertyMappings, new GenericBuilderSetter(i), mapper , currentBuilder); FieldMapper<S, T> fieldMapperAfterConstruct = builder.newMapperFieldMapper(propertyMappings, propertyMeta, mapper, currentBuilder); return new GenericBuilderGetterAndFieldMapper(biFunction, fieldMapper, transform, fieldMapperAfterConstruct); }
public GetterAndFieldMapper getterAndfieldMapper() { final MappingContextFactoryBuilder currentBuilder = builder.getMapperContextFactoryBuilder(propertyMeta, propertyMappings); final SourceMapper<S, ?> mapper = getsSourceMapper(currentBuilder); ContextualGetter<S, ?> biFunction = builder.newMapperGetterAdapter(mapper, currentBuilder); FieldMapper<S, T> fieldMapper = builder.newMapperFieldMapper(propertyMappings, propertyMeta, mapper, currentBuilder); return new GetterAndFieldMapper(biFunction, fieldMapper); }
public GetterAndFieldMapper getterAndfieldMapper() { final MappingContextFactoryBuilder currentBuilder = builder.getMapperContextFactoryBuilder(propertyMeta, propertyMappings); final SourceMapper<S, ?> mapper = getsSourceMapper(currentBuilder); ContextualGetter<S, ?> biFunction = builder.newMapperGetterAdapter(mapper, currentBuilder); FieldMapper<S, T> fieldMapper = builder.newMapperFieldMapper(propertyMappings, propertyMeta, mapper, currentBuilder); return new GetterAndFieldMapper(biFunction, fieldMapper); }