Hello everybody!
I have never used reflection before is my first time even playing around with it.
I was thinking about a utility that will take a pojo as a parameter and them split a delimited line based on the fields defined in the pojo, create a new instance of the pojo and set the fields.
The idea is to parse a delimited file and not having to write the parsing logic every time. Just create the object that matches all the columns in the file and you are good to go.
I am using reflection to achieve this. However, I have never used it and I am not sure of any side effects when it comes to performance? Or any other thing I should be aware of.
Please advice.
Thanks!
I have never used reflection before is my first time even playing around with it.
I was thinking about a utility that will take a pojo as a parameter and them split a delimited line based on the fields defined in the pojo, create a new instance of the pojo and set the fields.
The idea is to parse a delimited file and not having to write the parsing logic every time. Just create the object that matches all the columns in the file and you are good to go.
I am using reflection to achieve this. However, I have never used it and I am not sure of any side effects when it comes to performance? Or any other thing I should be aware of.
Please advice.
Thanks!