From 72a7bdbb83e07e41cf1c7ed55a43e90ce1fbf53c Mon Sep 17 00:00:00 2001 From: Andreas Gudian Date: Sun, 23 Aug 2015 21:40:18 +0200 Subject: [PATCH] #592 Improve @DecoratedWith javadoc --- .../src/main/java/org/mapstruct/DecoratedWith.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core-common/src/main/java/org/mapstruct/DecoratedWith.java b/core-common/src/main/java/org/mapstruct/DecoratedWith.java index 4f7500bf9..961eb48e8 100644 --- a/core-common/src/main/java/org/mapstruct/DecoratedWith.java +++ b/core-common/src/main/java/org/mapstruct/DecoratedWith.java @@ -88,8 +88,8 @@ import java.lang.annotation.Target; *

2. Component model 'spring'

*

Referencing the original mapper in the decorator

*

- * The generated implementation of the original mapper is annotated with the Spring's {@code @Qualifier("delegate")}. To - * autowire that bean in your decorator, add that qualifier annotation as well: + * The generated implementation of the original mapper is annotated with the Spring annotation + * {@code @Qualifier("delegate")}. To autowire that bean in your decorator, add that qualifier annotation as well: * *

  * public abstract class PersonMapperDecorator implements PersonMapper {
@@ -122,8 +122,10 @@ import java.lang.annotation.Target;
  * 

Referencing the original mapper

*

* JSR 330 doesn't specify qualifiers and only allows to specifically name the beans. Hence, the generated - * implementation of the original mapper is annotated with the {@code @Named("fully-qualified-name-of-generated-impl")}. - * To inject that bean in your decorator, add the same annotation to the delegate field: + * implementation of the original mapper is annotated with {@code @Named("fully-qualified-name-of-generated-impl")} + * (please note that when using a decorator, the class name of the mapper implementation ends with an underscore). To + * inject that bean in your decorator, add the same annotation to the delegate field (e.g. by copy/pasting it from the + * generated class): * *

  * public abstract class PersonMapperDecorator implements PersonMapper {