|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Documented
@Inherited
@Restriction
@Retention(value=SOURCE)
@Target(value={TYPE,METHOD})
public @interface Immutable
Immutables are objects whose state, if any, can not be mutated in any
way. Such objects either have no attributes - stateless - or are
Unmodifiable whose attributes are primitive or immutable. Examples of
immutable objects are strings and Collections.emptyList().
* Classes annotated as Immutable indicate that all their instances
have such property. Methods annotated as Immutable denote that all
the objects returned by them have such property.
Immutables are inherently thread-safe.
Restriction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||