openpojo icon indicating copy to clipboard operation
openpojo copied to clipboard

Add support for Immutable.

Open GoogleCodeExporter opened this issue 10 years ago • 0 comments

Need a rule to test immutability of an objects

Ideally every object deemed immutable has the following criteria:
1. All Fields are final.
2. Setters return a new copy of the object not update any setting on existing 
object.
3. Getters don't return modifiable references (i.e. return a clone or immutable 
objects).

Thank you Kajetan for this request.


Original issue reported on code.google.com by [email protected] on 1 Oct 2012 at 6:39

GoogleCodeExporter avatar Mar 15 '15 19:03 GoogleCodeExporter