public interface Freezable<T>
T of this interface should be set to the bean
type. The generic type is used in freeze() to allow chaining
freeze() to modern bean style setters.
If you want to be able to make the bean immutable again use sub interface
TempFreezable.
The bean instance is set to immutable (aka frozen) by calling
freeze(). All subsequent calls to any setter will cause a
BeanFrozenException to be thrown from the setter.
| Modifier and Type | Method and Description |
|---|---|
T |
freeze()
Set the bean to immutable and prevents all further setter calls.
|
boolean |
isFrozen() |
T freeze()
ModernBeanStyleboolean isFrozen()
true if the bean was switched to immutable with a
previous freeze() call