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>
|
||||
* </ul>
|
||||
* Example:
|
||||
*
|
||||
* <pre>
|
||||
* @Qualifier
|
||||
* @Target(ElementType.METHOD)
|
||||
* @Retention(RetentionPolicy.SOURCE)
|
||||
* public @interface EnglishToGerman {}
|
||||
* @Retention(RetentionPolicy.CLASS)
|
||||
* public @interface EnglishToGerman {
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
|
@ -749,7 +749,7 @@ Enter the qualifier approach:
|
||||
----
|
||||
@Qualifier
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface TitleTranslator {
|
||||
}
|
||||
----
|
||||
@ -764,7 +764,7 @@ And, some qualifiers to indicate which translator to use to map from source lang
|
||||
----
|
||||
@Qualifier
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface EnglishToGerman {
|
||||
}
|
||||
----
|
||||
@ -773,7 +773,7 @@ public @interface EnglishToGerman {
|
||||
----
|
||||
@Qualifier
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface GermanToEnglish {
|
||||
}
|
||||
----
|
||||
|
@ -31,6 +31,6 @@ import org.mapstruct.Qualifier;
|
||||
*/
|
||||
@Qualifier
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface CreateGermanRelease {
|
||||
}
|
||||
|
@ -31,6 +31,6 @@ import org.mapstruct.Qualifier;
|
||||
*/
|
||||
@Qualifier
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface EnglishToGerman {
|
||||
}
|
||||
|
@ -28,6 +28,6 @@ import java.lang.annotation.Target;
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface NonQualifierAnnotated {
|
||||
}
|
||||
|
@ -31,6 +31,6 @@ import org.mapstruct.Qualifier;
|
||||
*/
|
||||
@Qualifier
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface TitleTranslator {
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user