diff --git a/core/src/main/java/org/mapstruct/DecoratedWith.java b/core/src/main/java/org/mapstruct/DecoratedWith.java index 215843ec0..b16dbad4a 100644 --- a/core/src/main/java/org/mapstruct/DecoratedWith.java +++ b/core/src/main/java/org/mapstruct/DecoratedWith.java @@ -41,7 +41,7 @@ import java.lang.annotation.Target; * @author Gunnar Morling */ @Target(ElementType.TYPE) -@Retention(RetentionPolicy.RUNTIME) +@Retention(RetentionPolicy.SOURCE) public @interface DecoratedWith { /** diff --git a/core/src/main/java/org/mapstruct/Mapping.java b/core/src/main/java/org/mapstruct/Mapping.java index f3c650e30..872cba812 100644 --- a/core/src/main/java/org/mapstruct/Mapping.java +++ b/core/src/main/java/org/mapstruct/Mapping.java @@ -18,6 +18,10 @@ */ package org.mapstruct; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; import java.text.SimpleDateFormat; import java.util.Date; @@ -26,6 +30,8 @@ import java.util.Date; * * @author Gunnar Morling */ +@Retention(RetentionPolicy.SOURCE) +@Target(ElementType.METHOD) public @interface Mapping { /** diff --git a/core/src/main/java/org/mapstruct/MappingTarget.java b/core/src/main/java/org/mapstruct/MappingTarget.java index 2a8c70e48..660cc93d3 100644 --- a/core/src/main/java/org/mapstruct/MappingTarget.java +++ b/core/src/main/java/org/mapstruct/MappingTarget.java @@ -19,6 +19,8 @@ package org.mapstruct; import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** @@ -28,6 +30,7 @@ import java.lang.annotation.Target; * * @author Andreas Gudian */ -@Target( ElementType.PARAMETER ) +@Target(ElementType.PARAMETER) +@Retention(RetentionPolicy.CLASS) public @interface MappingTarget { } diff --git a/core/src/main/java/org/mapstruct/Mappings.java b/core/src/main/java/org/mapstruct/Mappings.java index 6de160ae2..aaf8ade71 100644 --- a/core/src/main/java/org/mapstruct/Mappings.java +++ b/core/src/main/java/org/mapstruct/Mappings.java @@ -18,11 +18,18 @@ */ package org.mapstruct; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + /** * Configures the mappings of several bean attributes. * * @author Gunnar Morling */ +@Retention(RetentionPolicy.SOURCE) +@Target(ElementType.METHOD) public @interface Mappings { /** diff --git a/core/src/main/java/org/mapstruct/TargetType.java b/core/src/main/java/org/mapstruct/TargetType.java index 34d44671e..303eb95f9 100644 --- a/core/src/main/java/org/mapstruct/TargetType.java +++ b/core/src/main/java/org/mapstruct/TargetType.java @@ -19,6 +19,8 @@ package org.mapstruct; import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** @@ -29,6 +31,7 @@ import java.lang.annotation.Target; * * @author Andreas Gudian */ -@Target( ElementType.PARAMETER ) +@Target(ElementType.PARAMETER) +@Retention(RetentionPolicy.CLASS) public @interface TargetType { }