mercredi 14 juin 2017

How can we maintain mutability of a class with reflection in Java?

I am aware about the concept of immutability of a class and how to make a class immutable, but there are certain ways that can break the immutability of that class like reflection, serialization etc. So I want to know the way to maintain the mutability of a class with reflection.





Aucun commentaire:

Enregistrer un commentaire