public class HeaderColumnNameMappingStrategy extends Object implements MappingStrategy
Modifier and Type | Field and Description |
---|---|
protected PropertyDescriptor[] |
descriptors |
protected String[] |
header |
protected Class |
type |
Constructor and Description |
---|
HeaderColumnNameMappingStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
captureHeader(CSVReader reader)
Implemention of this method can grab the header line before parsing begins to use to map columns
to bean properties.
|
Object |
createBean() |
PropertyDescriptor |
findDescriptor(int col)
Implementation will have to return a property descriptor from a bean based on the current column.
|
protected PropertyDescriptor |
findDescriptor(String name) |
protected String |
getColumnName(int col) |
Class |
getType() |
protected PropertyDescriptor[] |
loadDescriptors(Class cls) |
protected boolean |
matches(String name,
PropertyDescriptor desc) |
void |
setType(Class type) |
protected PropertyDescriptor[] descriptors
public HeaderColumnNameMappingStrategy()
public void captureHeader(CSVReader reader) throws IOException
MappingStrategy
captureHeader
in interface MappingStrategy
IOException
public PropertyDescriptor findDescriptor(int col) throws IntrospectionException
MappingStrategy
findDescriptor
in interface MappingStrategy
IntrospectionException
protected String getColumnName(int col)
protected PropertyDescriptor findDescriptor(String name) throws IntrospectionException
IntrospectionException
protected boolean matches(String name, PropertyDescriptor desc)
protected PropertyDescriptor[] loadDescriptors(Class cls) throws IntrospectionException
IntrospectionException
public Object createBean() throws InstantiationException, IllegalAccessException
createBean
in interface MappingStrategy
InstantiationException
IllegalAccessException
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses