How do I identify immutable objects in Java
There is no reliable way to detect if a class is immutable. This is because there are so many ways a property of a class might be altered and you can’t detect all of them via reflection. The only way to get close to this is: Only allow final properties of types that are immutable … Read more