View Javadoc
1   package org.csveed.annotations;
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   * Date is a special case, since it will require a format to be supplied. The format is similar to the one
10  * used in SimpleDateFormat. As a matter of fact, this class is used under the hood to arrange the conversion.
11  * @author Robert Bor
12  */
13  @Target(ElementType.FIELD)
14  @Retention(RetentionPolicy.RUNTIME)
15  public @interface CsvDate {
16  
17      /**
18      * The format to use for converting between String and java.util.Date
19      * @return format for the Date
20      */
21      String format() default "yyyy-MM-dd";
22  }