1 package com.opencsv.bean.processor;
2
3 import java.lang.annotation.*;
4
5 /**
6 * Specifies the binding of a processor to a field in a bean. This processor will run
7 * against the string that will be converted and assigned to the field and will be run
8 * prior to the validation and conversion.
9 *
10 * @author Scott Conway
11 * @since 5.0
12 */
13 @Documented
14 @Retention(RetentionPolicy.RUNTIME)
15 @Target(ElementType.FIELD)
16 public @interface PreAssignmentProcessor {
17 /**
18 * Returns the processor that will process the string.
19 *
20 * @return The class of the processor that will process the bean field
21 * string value
22 */
23 Class<? extends StringProcessor> processor();
24
25 /**
26 * This is used to store additional information needed by the
27 * {@link StringProcessor}.
28 * This could, for example, be a default value so the same processor
29 * could be used by different fields.
30 *
31 * @return Parameter string required by the {@link StringProcessor}
32 */
33 String paramString() default "";
34 }