MapStruct should be able to map A to C if it knows how to
- map 'A' to 'B'
- map 'B' to 'C'
Example (see also #119).
a) 'A' is JAXBElement<Source>
b) 'B' is Source
c) 'C' is Target
Then the new build-in method below would make mapping 1):
public <T> T convert( JAXBElement<T> t ) {
return t.isNil() ? null : t.getValue();
}
And a user Mapper method
@Mapper
public interface SourceTargetMapper {
Target sourceToTarget(Source source);
}
Would make mapping 2).
However, MapStruct can currently not make the complete mapping automatically.
MapStruct should be able to map A to C if it knows how to
Example (see also #119).
a) 'A' is
JAXBElement<Source>b) 'B' is
Sourcec) 'C' is
TargetThen the new build-in method below would make mapping 1):
And a user
MappermethodWould make mapping 2).
However, MapStruct can currently not make the complete mapping automatically.