#170 Specifying retention policy for all annotation types

This commit is contained in:
Gunnar Morling 2014-03-11 22:44:13 +01:00
parent 64ca0ab949
commit 2b633211dd
5 changed files with 22 additions and 3 deletions

View File

@ -41,7 +41,7 @@ import java.lang.annotation.Target;
* @author Gunnar Morling
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Retention(RetentionPolicy.SOURCE)
public @interface DecoratedWith {
/**

View File

@ -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 {
/**

View File

@ -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 {
}

View File

@ -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 {
/**

View File

@ -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 {
}