Is there any way the set methods of a given class, are used when using Gson\'s fromJson method?
I would like to do this because for every String>
No, there is not. Gson works mainly by reflection on instance fields. So if you do not plan to move to Jackson that has this feature I think you cannot have a general way to call your setters. So there's no annotation for that.
BUT
to achieve your specific need you could:
I can provide you with more hints as long as you post some code or give information about your data/JSON.