Closed Infeligo closed 4 years ago
At first I’m not very inclined. There are library that do that well already as far as I now. What would be the benefit of supporting it here. What advantage over other libraries? But saying that it should be possible to implement something, we already have all the meta it’s just a matter of linking source prop to dest prop.
Well, I think you correct that there are great alternatives already. My first thought was that it would be nice to have something that does not use annotation processing like MapStruct does (for the sake of technological alternative), but there are already projects like Orika and ModelMapper which use byte-code generation. So yes, maybe it not worth it.
This is a feature request. How about adding functionality for mapping between two classes? This could be somewhat similar to MapStruct, but less customizable.
The main use case that I think of is copy constructors (something that Lombok is not willing to support) and projections (a "view" of a bean with less fields). Of course, all of this could benefit from relaxed property matching.
What do you think of this idea?