T - The type of bean being processedpublic class FuzzyMappingStrategy<T> extends HeaderColumnNameMappingStrategy<T>
AbstractMappingStrategy.RecursiveTypefieldMap, forceCorrectRecordLength, writeOrdererrorLocale, headerIndex, profile, recursiveTypeTree, type| Constructor and Description |
|---|
FuzzyMappingStrategy()
Nullary constructor.
|
FuzzyMappingStrategy(boolean forceCorrectRecordLength)
Constructor to allow setting options for header name mapping.
|
| Modifier and Type | Method and Description |
|---|---|
void |
captureHeader(CSVReader reader)
Implementation of this method can grab the header line before parsing
begins to use to map columns to bean properties.
|
protected void |
loadUnadornedFieldMap(org.apache.commons.collections4.ListValuedMap<Class<?>,Field> fields)
This implementation intentionally does nothing in order to allow fuzzy
matching in case there are no annotations at all in the class in
question.
|
getBindingAnnotations, loadAnnotatedFieldMapchooseMultivaluedFieldIndexFromHeaderIndex, findField, findHeader, getFieldMap, initializeFieldMap, setColumnOrderOnWrite, verifyLineLengthcreateBean, determineConverter, filterIgnoredFields, generateHeader, getColumnName, getType, ignoreFields, indexBean, instantiateCustomConverter, isForbiddenClassForRecursion, loadFieldMap, loadRecursiveClasses, partitionFields, populateNewBean, selectAnnotationForProfile, setErrorLocale, setFieldValue, setProfile, setType, transmuteBeanclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisAnnotationDrivenpublic FuzzyMappingStrategy()
FuzzyMappingStrategyBuilderpublic FuzzyMappingStrategy(boolean forceCorrectRecordLength)
FuzzyMappingStrategyBuilder.forceCorrectRecordLength - If set, every record will be shortened
or lengthened to match the number of
headersFuzzyMappingStrategyBuilderprotected void loadUnadornedFieldMap(org.apache.commons.collections4.ListValuedMap<Class<?>,Field> fields)
loadUnadornedFieldMap in class HeaderNameBaseMappingStrategy<T>fields - A list of all non-synthetic fields in the bean to be
processedpublic void captureHeader(CSVReader reader) throws IOException, CsvRequiredFieldEmptyException
MappingStrategycaptureHeader in interface MappingStrategy<T>captureHeader in class HeaderNameBaseMappingStrategy<T>reader - The CSVReader to use for header parsingIOException - If parsing failsCsvRequiredFieldEmptyException - If a field is required, but the
header or column position for the field is not present in the inputCopyright © 2005–2025. All rights reserved.