Hello Andreas ,
Thanks for your answer !
Concerning your two first methods , i might not have been accurate enough on my needs. The problem is as follows : i need to map C or D to a corresponding C or D.
Here is a peusdo - code of what i would want :
if (a.getAttribC != null) {
b.setC = a.getAttribC)
} else {
b.setD = a.getAttribD
}
We work with an environment that guarantees that if attribC is null then attribD is not (the interface specifications says so) so i don't have to worry on that part.
In fact the current code (code legacy) that we have does the trick just like the pseudo-code i wrote previously.
Concerning your third answer : Indeed that might help me , but then i would bypass the use of mapstruct alltogether correct ?
Thanks for your answers!
Ritchie