public class HeaderColumnNameMappingStrategy extends java.lang.Object implements MappingStrategy
| Modifier and Type | Field and Description |
|---|---|
protected java.beans.PropertyDescriptor[] |
descriptors |
protected java.lang.String[] |
header |
protected java.lang.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.
|
java.lang.Object |
createBean() |
java.beans.PropertyDescriptor |
findDescriptor(int col)
Implementation will have to return a property descriptor from a bean based on the current column.
|
protected java.beans.PropertyDescriptor |
findDescriptor(java.lang.String name) |
protected java.lang.String |
getColumnName(int col) |
java.lang.Class |
getType() |
protected java.beans.PropertyDescriptor[] |
loadDescriptors(java.lang.Class cls) |
protected boolean |
matches(java.lang.String name,
java.beans.PropertyDescriptor desc) |
void |
setType(java.lang.Class type) |
protected java.lang.String[] header
protected java.beans.PropertyDescriptor[] descriptors
protected java.lang.Class type
public void captureHeader(CSVReader reader) throws java.io.IOException
MappingStrategycaptureHeader in interface MappingStrategyjava.io.IOExceptionpublic java.beans.PropertyDescriptor findDescriptor(int col)
throws java.beans.IntrospectionException
MappingStrategyfindDescriptor in interface MappingStrategyjava.beans.IntrospectionExceptionprotected java.lang.String getColumnName(int col)
protected java.beans.PropertyDescriptor findDescriptor(java.lang.String name)
throws java.beans.IntrospectionException
java.beans.IntrospectionExceptionprotected boolean matches(java.lang.String name,
java.beans.PropertyDescriptor desc)
protected java.beans.PropertyDescriptor[] loadDescriptors(java.lang.Class cls)
throws java.beans.IntrospectionException
java.beans.IntrospectionExceptionpublic java.lang.Object createBean()
throws java.lang.InstantiationException,
java.lang.IllegalAccessException
createBean in interface MappingStrategyjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionpublic java.lang.Class getType()
public void setType(java.lang.Class type)