mygreen / super-csv-annotation

'Super CSV' extention library for annotation
Apache License 2.0
31 stars 7 forks source link

@CsvColumn label attribute purpose? #2

Closed robross0606 closed 11 years ago

robross0606 commented 11 years ago

If the label attribute is not specified, the field name is used as the label. If the label attribute IS specified then SuperCSV looks for a getter/setter with that label name. If those getter/setter methods are created, there is no need for the label attribute since the getter/setter encapsulates the field anyway and the actual field could be named anything. What is the point of the label attribute if not to allow a column to be mapped to a field named something else? Getter/setter methods should be generated automatically based on annotations instead of allowing SuperCSV to look for missing accessor/mutator.

robross0606 commented 11 years ago

Okay, think I understand the purpose of this one. Still, disappointing that all the boilerplate get/set code is necessary since there is a bug when using public fields.