Professional Documents
Culture Documents
Such objects are created privately mutable, and then locked for publication.
See <http://blogs.oracle.com/jrose/entry/value_types_in_the_vm>
and <http://blogs.oracle.com/jrose/entry/larval_objects_in_the_vm>.
For more general background, see [Rich Hickey's talk on Values]
(http://www.infoq.com/presentations/Value-Values).
The term _immutable_ is a general term for certain classes of data structures.
Inside the JVM, we need a specific, positive term for an object which has been made
immutable.
We could say it has been made _final_ or _frozen_, but instead will repurpose the
term _locked_.
This is not a perfect choice, since immutability is only partially related to
synchronization.
The term allows intuitive API names like `Arrays.lockedCopyOf` or
`Objects.cloneAsLocked`.
An object which is immutable is called _permanently locked_, or (if there is no
ambiguity) simply _locked_.