Parsed in a record.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private Boolean | |
| private final Class | |
| private final Object | |
| private NormalizedString | |
| private Class | |
| private int | |
| private final Class | |
| private final boolean | |
| private boolean | |
| private final Method | |
| private final AnnotatedElement | |
| private final Method |
| Access | Constructor and Description |
|---|---|
| public | FieldMapping(Class<?>
the class that contains a the given field. beanClass, AnnotatedElement target, PropertyWrapper the property descriptor of this field, if any. If this bean does not have getters/setters, it will be accessed directly. property, HeaderTransformer an optional transformer, NormalizedString[] HeaderTransformer to modify header names/positions in attributes of Nested classes.list of headers parsed from the input or manually set with headers)CommonSettings#setHeaders(String.Creates the mapping and identifies how it is mapped (by name or by index) |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the given instance contains the field/accessor method and can use this field mapping to modify its internal state; otherwise falsethe object whose type will be verified in order to identify if it contains the mapped field instance)Queries whether this field mapping can be applied over a given object instance. |
| private void | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public NormalizedString | Returns: the column name associated with this field, ornull if there's no such association.Returns the column name against which this field is mapped. |
| public Class | Returns: the field's parent classReturns the parent class that contains the mapped field. |
| public Class | |
| public int | Returns: the column index associated with this field, or -1 if there's no such association.Returns the column index against which this field is mapped. |
| public AnnotatedElement | |
| public int | |
| public boolean | Returns: true if the field is mapped to a column name, otherwise falseReturns |
| public boolean | Returns: true if the field is mapped to a column index, otherwise falseReturns |
| public Object | |
| private Object | |
| private void | |
| public void | setFieldName(String
the column name associated with this field fieldName)Defines the column name against which this field is mapped, overriding any current name derived from annotations or from the attribute name itself. |
| public void | setFieldName(NormalizedString
the column name associated with this field fieldName)Defines the column name against which this field is mapped, overriding any current name derived from annotations or from the attribute name itself. |
| public void | setIndex(int
the column index associated with this field index)Defines the column index against which this field is mapped, overriding any current position derived from annotations. |
| public String | |
| public void |
| accessible | back to summary |
|---|---|
| private boolean accessible | |
| applyDefault | back to summary |
|---|---|
| private Boolean applyDefault | |
| beanClass | back to summary |
|---|---|
| private final Class<?> beanClass | |
| defaultPrimitiveValue | back to summary |
|---|---|
| private final Object defaultPrimitiveValue | |
| fieldName | back to summary |
|---|---|
| private NormalizedString fieldName | |
| fieldType | back to summary |
|---|---|
| private Class<T> fieldType | |
| index | back to summary |
|---|---|
| private int index | |
| parentClass | back to summary |
|---|---|
| private final Class<T> parentClass | |
| primitive | back to summary |
|---|---|
| private final boolean primitive | |
| primitiveNumber | back to summary |
|---|---|
| private boolean primitiveNumber | |
| readMethod | back to summary |
|---|---|
| private final Method readMethod | |
| target | back to summary |
|---|---|
| private final AnnotatedElement target | |
| writeMethod | back to summary |
|---|---|
| private final Method writeMethod | |
| FieldMapping | back to summary |
|---|---|
| public FieldMapping(Class<?> beanClass, AnnotatedElement target, PropertyWrapper property, HeaderTransformer transformer, NormalizedString[] headers) Creates the mapping and identifies how it is mapped (by name or by index)
| |
| canWrite | back to summary |
|---|---|
| public boolean canWrite(Object instance) Queries whether this field mapping can be applied over a given object instance.
| |
| determineFieldMapping | back to summary |
|---|---|
| private void determineFieldMapping(HeaderTransformer transformer, NormalizedString[] headers) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getFieldName | back to summary |
|---|---|
| public NormalizedString getFieldName() Returns the column name against which this field is mapped.
| |
| getFieldParent | back to summary |
|---|---|
| public Class Returns the parent class that contains the mapped field.
| |
| getFieldType | back to summary |
|---|---|
| public Class Returns the type of the mapped field
| |
| getIndex | back to summary |
|---|---|
| public int getIndex() Returns the column index against which this field is mapped.
| |
| getTarget | back to summary |
|---|---|
| public AnnotatedElement getTarget() Returns the
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isMappedToField | back to summary |
|---|---|
| public boolean isMappedToField() Returns
| |
| isMappedToIndex | back to summary |
|---|---|
| public boolean isMappedToIndex() Returns
| |
| read | back to summary |
|---|---|
| public Object read(Object instance) Reads the value accessible by this field mapping from a given object | |
| read | back to summary |
|---|---|
| private Object read(Object instance, boolean ignoreErrors) | |
| setAccessible | back to summary |
|---|---|
| private void setAccessible() | |
| setFieldName | back to summary |
|---|---|
| public void setFieldName(String fieldName) Defines the column name against which this field is mapped, overriding any current name derived from annotations or from the attribute name itself.
| |
| setFieldName | back to summary |
|---|---|
| public void setFieldName(NormalizedString fieldName) Defines the column name against which this field is mapped, overriding any current name derived from annotations or from the attribute name itself.
| |
| setIndex | back to summary |
|---|---|
| public void setIndex(int index) Defines the column index against which this field is mapped, overriding any current position derived from annotations.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| write | back to summary |
|---|---|
| public void write(Object instance, Object value) Writes a value to the field of a given object instance, whose field is accessible through this field mapping. | |