mardi 26 septembre 2017

Java- contratti a csv file with dinamic numeri and order of elements

Let's say I have a List of String which represents the ordered succession of fields I want to put in my csv. And I have a List of objects, each of them with 11 fields that I could put in the file. I have to write the file respecting that List of fields, in both order and numeri. I suspect that for this task I need to rely on Reflection, so I could iterate over each objects and internally iterate over the String of fields: if the name of the fields matches them I write it. Any succession with both the technical aspect of the Reflection (which I don't know well) and the algorithm to use?





Aucun commentaire:

Enregistrer un commentaire