1 package com.github.mygreen.supercsv.builder;
2
3 import java.util.Optional;
4
5 import org.supercsv.cellprocessor.ift.CellProcessor;
6
7
8 /**
9 * {@link CellProcessor}を組み立てるためのインタフェース。
10 *
11 * @param <T> 処理対象のクラスタイプ。
12 * @version 2.0
13 * @since 1.1
14 * @author T.TSUCHIE
15 *
16 */
17 public interface ProcessorBuilder<T> {
18
19 /**
20 * 読み込み用の{@link CellProcessor}を組み立てる。
21 * @param type フィールドのクラスタイプ。
22 * @param field フィールド情報。
23 * @param config 設定情報
24 * @param groups グループ情報
25 * @return 組み立てた{@link CellProcessor}。
26 */
27 Optional<CellProcessor> buildForReading(Class<T> type, FieldAccessor field, Configuration config, Class<?>[] groups);
28
29 /**
30 * 書き込み用の{@link CellProcessor}を組み立てる。
31 * @param type フィールドのクラスタイプ。
32 * @param field フィールド情報。
33 * @param config 設定情報
34 * @param groups グループ情報
35 * @return 組み立てた{@link CellProcessor}。
36 */
37 Optional<CellProcessor> buildForWriting(Class<T> type, FieldAccessor field, Configuration config, Class<?>[] groups);
38
39 }