The static transformation became a widely used feature, but, as it is now, it uses a brand new Transformer (dynamically generated) without any custom configuration.
The solution I'd like
Possibility to use the static transformation feature with a given Transformer properly configured.
Describe alternatives you've considered
Alternatively, the same result can be obtained without using static transformation.
Example call
Transformer myCustomTransformer =
new BeanUtils().getTransformer()
.withFieldMapping(new FieldMapping("name", "differentName"));
Function<FromFooSimple, ImmutableToFooSimple> transformerFunction = BeanUtils.getTransformer(myCustomTransformer, ImmutableToFooSimple.class);
List<ImmutableToFooSimple> actual = fromFooSimpleList.stream()
.map(transformerFunction)
.collect(Collectors.toList());
The static transformation became a widely used feature, but, as it is now, it uses a brand new Transformer (dynamically generated) without any custom configuration.
The solution I'd like
Possibility to use the static transformation feature with a given Transformer properly configured.
Describe alternatives you've considered
Alternatively, the same result can be obtained without using static transformation.
Example call