}
}
//Add all methods of used mappers in order to reference them in the aggregated model
if ( usedMapper.equals( mapperToImplement ) ) {
MapperConfig mapperSettings = MapperConfig.getInstanceOn( usedMapper );
if ( !mapperSettings.isValid() ) {
throw new AnnotationProcessingException(
"Couldn't retrieve @Mapper annotation", usedMapper, mapperSettings.getAnnotationMirror()
);
}
for ( TypeMirror mapper : mapperSettings.uses() ) {
methods.addAll( retrieveMethods( asTypeElement( mapper ), mapperToImplement ) );
}
}
return methods;