Package com.jcabi.aspects
Annotation Type Immutable
-
@Documented @Retention(RUNTIME) @Target(TYPE) public @interface Immutable
Annotates an immutable class.For example:
@Immutable public class Foo { private String data; }As soon as you try to instantiate this class a runtime exception will be thrown, because this class is mutable.
- Since:
- 0.7.8
- See Also:
- http://aspects.jcabi.com/, Objects Should Be Immutable, by Yegor Bugayenko