public class HeaderColumnNameMappingStrategy<T> extends Object implements MappingStrategy<T>
| Constructor and Description |
|---|
HeaderColumnNameMappingStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
captureHeader(CSVReader reader) |
void |
captureHeader(au.com.bytecode.opencsv.CSVReader reader)
Implementation of this method can grab the header line before parsing begins to use to map columns
to bean properties.
|
T |
createBean() |
PropertyDescriptor |
findDescriptor(int col)
Implementation will have to return a property descriptor from a bean based on the current column.
|
Class<T> |
getType() |
void |
setType(Class<T> type) |
public void captureHeader(CSVReader reader) throws IOException
IOExceptionpublic PropertyDescriptor findDescriptor(int col) throws IntrospectionException
MappingStrategyfindDescriptor in interface MappingStrategy<T>col - the column to find the description forIntrospectionExceptionpublic T createBean() throws InstantiationException, IllegalAccessException
createBean in interface MappingStrategy<T>InstantiationExceptionIllegalAccessExceptionpublic void captureHeader(au.com.bytecode.opencsv.CSVReader reader)
throws IOException
MappingStrategycaptureHeader in interface MappingStrategy<T>reader - the CSVReader to use for header parsingIOException - if parsing failsDMelt 2.0 © DataMelt by jWork.ORG