If I have a class with non-primitive public members and I want to populate them from a CSV file with OpenCSV, how can I do this? I notice that OpenCSV has some protected members relating to PropertyDescriptors
So let's say I have a Person class that has an Address member, and my CSV file contains the detailsd for each person including their address..
Person{
private String name;
private Address al
public void setAddress(Address a){..}
public void setName(String name){..}
}
Addess{
private String line1;
private String line2;
private String postCode;
.
.
.
}
CSV file:
NAME | ADDR1 | ADDR2 | PCODE ...
John Smith |Some place | Some town | NW234
Thanks,
- A