org.nakedobjects.applib.annotation
Annotation Type Immutable


@Inherited
@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface Immutable

Indicates that an instance cannot be changed.

To make something always immutable used the form @Immutable. To make something immutable only once persisted use the form @Immutable(Immutable.ONCE_PERSISTED).

By default any value types are assumed to be immutable, though this can be overridden if required. Immutable objects that are acting as a value type should almost certainly also follow the equal-by-content contract.

See Also:
Value, EqualByContent

Optional Element Summary
 When value
           
 

value

public abstract When value
Default:
ALWAYS


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.