// Get annotation @CsvRecord from the class
CsvRecord record = cl.getAnnotation(CsvRecord.class);
// Get annotation @Section from the class
Section section = cl.getAnnotation(Section.class);
if (record != null) {
if (LOG.isDebugEnabled()) {
LOG.debug("Csv record : " + record.toString());
}
// Get skipFirstLine parameter
skipFirstLine = record.skipFirstLine();
if (LOG.isDebugEnabled()) {
LOG.debug("Skip First Line parameter of the CSV : " + skipFirstLine);
}
// Get generateHeaderColumnNames parameter
generateHeaderColumnNames = record.generateHeaderColumns();
if (LOG.isDebugEnabled()) {
LOG.debug("Generate header column names parameter of the CSV : " + generateHeaderColumnNames);
}
// Get Separator parameter
ObjectHelper.notNull(record.separator(), "No separator has been defined in the @Record annotation !");
separator = record.separator();
if (LOG.isDebugEnabled()) {
LOG.debug("Separator defined for the CSV : " + separator);
}
// Get carriage return parameter
crlf = record.crlf();
if (LOG.isDebugEnabled()) {
LOG.debug("Carriage return defined for the CSV : " + crlf);
}
// Get isOrdered parameter
messageOrdered = record.isOrdered();
if (LOG.isDebugEnabled()) {
LOG.debug("Must CSV record be ordered ? " + messageOrdered);
}
}
if (section != null) {
// Test if section number is not null
ObjectHelper.notNull(section.number(), "No number has been defined for the section !");
// Get section number and add it to the sections
sections.put(cl.getName(), section.number());
}
}
}
}