// Path: src/main/java/com/github/bingoohuang/excel2beans/annotations/ExcelColAlign.java
// public enum ExcelColAlign {
//     LEFT, CENTER, RIGHT, NONE
// }


import com.github.bingoohuang.excel2beans.annotations.ExcelColAlign;
import com.github.bingoohuang.excel2beans.annotations.ExcelColIgnore;
import com.github.bingoohuang.excel2beans.annotations.ExcelColStyle;
import com.github.bingoohuang.utils.reflect.Fields;
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.Sheet;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
            Set<String> includedFields,
            ReflectAsmCache reflectAsmCache) {

        if (Fields.shouldIgnored(field, ExcelColIgnore.class)) return;
        if (includedFields != null && !includedFields.contains(field.getName())) return;

        val bf = new ExcelBeanField(field, fields.size(), reflectAsmCache);
        if (bf.isElementTypeSupported()) {
            setStyle(field, bf);
            fields.add(bf);
        } else {
            log.debug("bean field {} was ignored by unsupported type {}",
                    field, bf.getElementType());
        }
    }


    private void setStyle(Field field, ExcelBeanField beanField) {
        val colStyle = field.getAnnotation(ExcelColStyle.class);
        if (colStyle == null) return;

        beanField.setCellStyle(createAlign(colStyle));
    }

    private CellStyle createAlign(ExcelColStyle colStyle) {
        val style = sheet.getWorkbook().createCellStyle();
        style.setAlignment(convertAlign(colStyle.align(), style.getAlignmentEnum()));
        return style;
    }

// Path: src/main/java/com/github/bingoohuang/excel2beans/annotations/ExcelColAlign.java
// public enum ExcelColAlign {
//     LEFT, CENTER, RIGHT, NONE
// }


// Path: src/main/java/com/github/bingoohuang/excel2beans/ExcelBeanFieldParser.java
import com.github.bingoohuang.excel2beans.annotations.ExcelColAlign;
import com.github.bingoohuang.excel2beans.annotations.ExcelColIgnore;
import com.github.bingoohuang.excel2beans.annotations.ExcelColStyle;
import com.github.bingoohuang.utils.reflect.Fields;
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.Sheet;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

            Set<String> includedFields,
            ReflectAsmCache reflectAsmCache) {

        if (Fields.shouldIgnored(field, ExcelColIgnore.class)) return;
        if (includedFields != null && !includedFields.contains(field.getName())) return;

        val bf = new ExcelBeanField(field, fields.size(), reflectAsmCache);
        if (bf.isElementTypeSupported()) {
            setStyle(field, bf);
            fields.add(bf);
        } else {
            log.debug("bean field {} was ignored by unsupported type {}",
                    field, bf.getElementType());
        }
    }


    private void setStyle(Field field, ExcelBeanField beanField) {
        val colStyle = field.getAnnotation(ExcelColStyle.class);
        if (colStyle == null) return;

        beanField.setCellStyle(createAlign(colStyle));
    }

    private CellStyle createAlign(ExcelColStyle colStyle) {
        val style = sheet.getWorkbook().createCellStyle();
        style.setAlignment(convertAlign(colStyle.align(), style.getAlignmentEnum()));
        return style;
    }

    private HorizontalAlignment convertAlign(ExcelColAlign align, HorizontalAlignment defaultAlign) {