Generating CSV file from object in java
<p>At this moment I am working on generating csv from object and I got stuck. I dont know how to generate csv for nested class. For example we have got following classes:</p>

<pre><code>@Getter
@Setter
public class Person {
  private int age;
  private Name name;
}

@Getter
@Setter
public class Name {
  private String firstName;
  private String lastName;
}
</code></pre>

<p>There is huge problem for. Actually I tested few libraries like jackson and commons csv and I did not find solution. The main problem is that I dont know what fields are in object and have to prepare headers dynamically. Is there any simple way or library which allows for that operation? I would be thankfull for any tips.</p>