protected ColumnSpec getSpec(Annotation ann) {
        assert ann != null;
        Class<? extends Annotation> type = ann.annotationType();
        assert CharColumn.class.equals(type)
            || IntegerColumn.class.equals(type)
            || StringColumn.class.equals(type)
            || DelimCharColumn.class.equals(type);

        if (ann instanceof StringColumn) {
            StringColumn stringColumn = (StringColumn)ann;
            ColumnSpec spec = new ColumnSpec();
            spec.setLength(stringColumn.length());
            spec.setTypeEnum(TypeEnum.TYPE_STRING);
            spec.setStrict(stringColumn.strict());
            return spec;
        } else if (ann instanceof IntegerColumn) {
            IntegerColumn integerColumn = (IntegerColumn)ann;
            ColumnSpec spec = new ColumnSpec();
            spec.setLength(integerColumn.length());
            spec.setTypeEnum(TypeEnum.TYPE_INT);
            spec.setStrict(integerColumn.strict());
            return spec;
        } else if (ann instanceof DelimCharColumn) {
            int length = -1;
            ColumnSpec spec = new ColumnSpec();
            spec.setLength(length);
            spec.setTypeEnum(TypeEnum.TYPE_DELIM);
            spec.setDelim(((DelimCharColumn) ann).delim());
            return spec;
        }
        ColumnSpec spec = new ColumnSpec();
        spec.setLength(1);
        spec.setTypeEnum(TypeEnum.TYPE_CHAR);
        return spec;
    }