Class ColumnMapping.NameMapping
java.lang.Object
com.univocity.parsers.common.fields.AbstractColumnMapping<String>
com.univocity.parsers.common.fields.ColumnMapping.NameMapping
- All Implemented Interfaces:
Cloneable
- Enclosing class:
- ColumnMapping
-
Field Summary
Fields inherited from class com.univocity.parsers.common.fields.AbstractColumnMapping
mapping, prefix
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) String
Locates a given key based on an attribute or method name.(package private) String
getKeyPrefix
(String prefix, String key) Returns the prefix of a given key, i.e.(package private) String
Transforms the key so it can work with the given prefix.Methods inherited from class com.univocity.parsers.common.fields.AbstractColumnMapping
clone, extractPrefixes, isMapped, mapToColumn, mapToColumnIndex, mapToColumnIndexes, mapToColumnName, mapToColumnNames, mapToColumns, remove, updateFieldMapping
-
Constructor Details
-
NameMapping
-
-
Method Details
-
prefixKey
Description copied from class:AbstractColumnMapping
Transforms the key so it can work with the given prefix.- Specified by:
prefixKey
in classAbstractColumnMapping<String>
- Parameters:
prefix
- the current object nesting level, denoted by a dot-separated string of nested attribute names.key
- the key to transform.- Returns:
- the transformed key or
null
if the key can't be used with the given prefix
-
getKeyPrefix
Description copied from class:AbstractColumnMapping
Returns the prefix of a given key, i.e. the current nested object that is being targeted.- Specified by:
getKeyPrefix
in classAbstractColumnMapping<String>
- Parameters:
prefix
- the current prefix - a dot separated string with nested attribute nameskey
- the attribute name or method definition. If its own prefix starts with the given prefix, the next element after the dot will be returned (if any)- Returns:
- the name of the next nested object relative to the current prefix.
-
findKey
Description copied from class:AbstractColumnMapping
Locates a given key based on an attribute or method name.- Specified by:
findKey
in classAbstractColumnMapping<String>
- Parameters:
nameWithPrefix
- name of the attribute or method, prefixed with nested object names that identify the path to the target class member.- Returns:
- the key formed with the given attribute name or method definition
-