On Fri, Nov 11, 2011 at 12:50 PM, Emmanuel Bourg <ebo...@apache.org> wrote:
[SNIP]
>
> The other idea relates to the bean mapping feature. CSVFormat could be
> generified and work on annotated classes. I imagine something like this:
>
>    public class Person {
>        @CSVField(trim = true)
>        private String firstname;
>
>        @CSVField(header="NAME", width=12)
>        private String lastname;
>
>        @CSVField(header="DATE", format="yyyy-MM-dd")
>        private Date birthdate;
>    }
>
> then:
>
>    CSVFormat<Person> format = new CSVFormat().withType(Person.class);
>
>    for (Person person : format.parse(in)) {
>        ....
>    }
>
>
> What do you think?

These make me think of the annotation support Simo added to
[digester].  I wonder if there would be any value in extending
[digester]'s scope to formats beyond XML including CSV/flat files/etc.

Matt

>
>
> Emmanuel Bourg
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to