• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package junitparams.converters;
2 
3 import java.lang.annotation.ElementType;
4 import java.lang.annotation.Retention;
5 import java.lang.annotation.RetentionPolicy;
6 import java.lang.annotation.Target;
7 
8 /**
9  * Annotates parametrized test parameter with information about {@link Converter} that should be used for parameter conversion.
10  * <p>
11  * Can also be used to create custom annotations.<br>
12  * example:
13  * <pre>
14  *  &#064;Retention(RetentionPolicy.RUNTIME)
15  *  &#064;Target(ElementType.PARAMETER)
16  *  &#064;Param(converter = FormattedDateConverter.class)
17  *  public &#064;interface DateParam {
18  *
19  *      String format() default "dd.MM.yyyy";
20  *  }
21  * </pre>
22  * </p>
23  */
24 @Retention(RetentionPolicy.RUNTIME)
25 @Target({ElementType.ANNOTATION_TYPE, ElementType.PARAMETER})
26 public @interface Param {
27 
converter()28     Class<? extends Converter> converter();
29 }
30