mardi 20 février 2018

Scala Reflection to get the types of all fields of an object

I need to create a function which is accepting two objects of same class. One is the updated object and other one is the old object. I need to find the differences in updated object by considering the old object. Like we have getDeclaredFields method in java to fetch all the variables.I am seeking for a way to get all the fields of an object and then i have to iterate one by one field and on the basis of its type i have to check equals on both the objects.

Any leads will be appreciated.





Aucun commentaire:

Enregistrer un commentaire