Assure that value objects are immutable
The concept of value objects is that they are solely identified by their value and that if two value objects have the same value, they are considered identical. This allows for sharing the same instance of a value object among other objects - but only if the value doesn't change afterwards.
Make sure that value objects are immutable. Properties of a value object should only be set through the constructor. To enforce that we could intercept any potential setters and throw an exception if they are called.
#5 Updated by Karsten Dambekalns over 9 years ago
- Status changed from New to Resolved
- Assignee set to Karsten Dambekalns
- Target version set to 1.0 alpha 8
- Start date changed from 2009-06-05 to 2010-03-16
- % Done changed from 0 to 100
- Estimated time set to 1.00 h
As of r3962 value objects are checked for setters when building class schemata, thus settings this to resolved.