T - The type of the member variable being accessedpublic class FieldAccess<T> extends Object
The logic in opencsv is always:
Optional, wrap or unwrap as necessary. Empty
Optionals lead to null return values, and
null values lead to empty Optionals.| Constructor and Description |
|---|
FieldAccess(Field field)
Constructs this instance by determining what mode of access will work
for this field.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Determines equality between this object and another.
|
T |
getField(Object bean)
Returns the value of the field in the given bean.
|
int |
hashCode()
Creates a hash code for this object.
|
void |
setField(Object bean,
T value)
Sets the value of the field in the given bean.
|
String |
toString()
Returns a string representation of this object.
|
public FieldAccess(Field field)
field - The field to be accessed.public T getField(Object bean) throws IllegalAccessException, InvocationTargetException
bean - The bean from which the value of this field should be returnedIllegalAccessException - If there is a problem accessing the
member variableInvocationTargetException - If there is a problem accessing the
member variablepublic void setField(Object bean, T value) throws IllegalAccessException, InvocationTargetException
bean - The bean in which the value of the field should be setvalue - The value to be written into the member variable of the beanIllegalAccessException - If there is a problem accessing the
member variableInvocationTargetException - If there is a problem accessing the
member variablepublic int hashCode()
public boolean equals(Object obj)
Copyright © 2005–2025. All rights reserved.