mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#770 Update retention-policy of custom qualifier annotations in docs and tests to CLASS
.
This commit is contained in:
parent
27aa40c0ec
commit
c671692cd0
@ -35,11 +35,13 @@ import java.lang.annotation.Target;
|
|||||||
* <li>{@link MapMapping#valueQualifiedBy() }</li>
|
* <li>{@link MapMapping#valueQualifiedBy() }</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* Example:
|
* Example:
|
||||||
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* @Qualifier
|
* @Qualifier
|
||||||
* @Target(ElementType.METHOD)
|
* @Target(ElementType.METHOD)
|
||||||
* @Retention(RetentionPolicy.SOURCE)
|
* @Retention(RetentionPolicy.CLASS)
|
||||||
* public @interface EnglishToGerman {}
|
* public @interface EnglishToGerman {
|
||||||
|
* }
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
|
@ -749,7 +749,7 @@ Enter the qualifier approach:
|
|||||||
----
|
----
|
||||||
@Qualifier
|
@Qualifier
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.CLASS)
|
||||||
public @interface TitleTranslator {
|
public @interface TitleTranslator {
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
@ -764,7 +764,7 @@ And, some qualifiers to indicate which translator to use to map from source lang
|
|||||||
----
|
----
|
||||||
@Qualifier
|
@Qualifier
|
||||||
@Target(ElementType.METHOD)
|
@Target(ElementType.METHOD)
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.CLASS)
|
||||||
public @interface EnglishToGerman {
|
public @interface EnglishToGerman {
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
@ -773,7 +773,7 @@ public @interface EnglishToGerman {
|
|||||||
----
|
----
|
||||||
@Qualifier
|
@Qualifier
|
||||||
@Target(ElementType.METHOD)
|
@Target(ElementType.METHOD)
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.CLASS)
|
||||||
public @interface GermanToEnglish {
|
public @interface GermanToEnglish {
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
@ -796,7 +796,7 @@ public interface MovieMapper {
|
|||||||
|
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
====
|
====
|
||||||
|
|
||||||
.Custom mapper qualifying the methods it provides
|
.Custom mapper qualifying the methods it provides
|
||||||
====
|
====
|
||||||
@ -865,7 +865,7 @@ public interface MovieMapper {
|
|||||||
|
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
====
|
====
|
||||||
|
|
||||||
[WARNING]
|
[WARNING]
|
||||||
====
|
====
|
||||||
|
@ -31,6 +31,6 @@ import org.mapstruct.Qualifier;
|
|||||||
*/
|
*/
|
||||||
@Qualifier
|
@Qualifier
|
||||||
@Target(ElementType.METHOD)
|
@Target(ElementType.METHOD)
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.CLASS)
|
||||||
public @interface CreateGermanRelease {
|
public @interface CreateGermanRelease {
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,6 @@ import org.mapstruct.Qualifier;
|
|||||||
*/
|
*/
|
||||||
@Qualifier
|
@Qualifier
|
||||||
@Target(ElementType.METHOD)
|
@Target(ElementType.METHOD)
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.CLASS)
|
||||||
public @interface EnglishToGerman {
|
public @interface EnglishToGerman {
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,6 @@ import java.lang.annotation.Target;
|
|||||||
* @author Sjaak Derksen
|
* @author Sjaak Derksen
|
||||||
*/
|
*/
|
||||||
@Target(ElementType.METHOD)
|
@Target(ElementType.METHOD)
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.CLASS)
|
||||||
public @interface NonQualifierAnnotated {
|
public @interface NonQualifierAnnotated {
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,6 @@ import org.mapstruct.Qualifier;
|
|||||||
*/
|
*/
|
||||||
@Qualifier
|
@Qualifier
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.CLASS)
|
||||||
public @interface TitleTranslator {
|
public @interface TitleTranslator {
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user