I think there are two use cases that would require a different API. First, if you are
working with a third-party class, you may not be able to change it to implement Immutable.
Another scenario is when it is safe to replace a Class, but it is not actually immutable.
For instance, there might be a JavaBean named Order. When an order is equal to another
one, it can be safely replaced, but it is not actually immutable.
So I suggest the interface is renamed to Replaceable and a method is added to JOS that
allows use-case replaceable classes to be registered.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038034#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...