Annotation Type DeepImmutable
A class is considered
DeepImmutable when:
- All fields are
finaland cannot be reassigned - All objects reachable from the instance are immutable (the entire object graph is immutable)
- No mutable internal state is exposed
Classes annotated with DeepImmutable are thread-safe,
provided they are safely constructed (the this reference does not escape during construction)
and do not expose mutable state.
This annotation is for documentation purposes only and does not enforce or verify immutability.
- Since:
- 4.1.0
- See Also: