@Documented @Retention(value=RUNTIME) @Target(value=TYPE) public @interface Immutable
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.
Copyright © 2012–2017 jcabi.com. All rights reserved.