mapstruct-spring-extensions
mapstruct-spring-extensions copied to clipboard
Provide mechanism for adding annotations to generated code
@Chessray just my 2 cents for this. You can already use @AnnotateWith, you don't need to use a new annotation in the project. You'll need to do similar work though to parse the annotation and get the data out of it
I believe we can make use of the annotation only for one case at the moment. While the core is clear in generating one implementation per @Mapper annotation, the extension is primarily configuration based. There's no 1:1 relationship between annotated classes and generated elements. We can add it to the @DelegatingConverter points, but for the rest I'm looking at adding new attributes to the config annotation. I wouldn't be sure how to interpret an @AnnotateWith on the config class.