class EnumConverter implements ConverterExcelOption {

    @SuppressWarnings("all")
    private final Class<? extends Enum> type;

    @Override
    public Object convertForWrite(Object val, ExcelHeader header) {<FILL_FUNCTION_BODY>}

    @Override
    @SuppressWarnings("all")
    public Object convertForRead(Object val, ExcelHeader header) {
        if (val == null) {
            return null;
        }
        if (EnumDict.class.isAssignableFrom(type)) {
            Locale locale = LocaleUtils.current();
            return EnumDict
                .find((Class) type, e -> {
                    return e.eq(val) || Objects.equals(val, e.getI18nMessage(locale));
                })
                .orElse(null);
        }
        return Enum.valueOf(type, String.valueOf(val));
    }
}

        if (val instanceof EnumDict) {
            return ((EnumDict<?>) val).getI18nMessage(LocaleUtils.current());
        }
        if (val instanceof Enum) {
            return ((Enum<?>) val).name();
        }

        return val;
    
<no_super_class>