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

private class ColumnMapping.NameMapping extends AbstractColumnMapping<String>
  • Constructor Details

  • Method Details

    • prefixKey

      String prefixKey(String prefix, String key)
      Description copied from class: AbstractColumnMapping
      Transforms the key so it can work with the given prefix.
      Specified by:
      prefixKey in class AbstractColumnMapping<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

      String getKeyPrefix(String prefix, String key)
      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 class AbstractColumnMapping<String>
      Parameters:
      prefix - the current prefix - a dot separated string with nested attribute names
      key - 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

      String findKey(String nameWithPrefix)
      Description copied from class: AbstractColumnMapping
      Locates a given key based on an attribute or method name.
      Specified by:
      findKey in class AbstractColumnMapping<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