Annotation Type Immutable


  • @Retention(SOURCE)
    @Target({TYPE,METHOD,FIELD,PARAMETER,LOCAL_VARIABLE})
    public @interface Immutable
    Marks classes/enums which do not change their state. Marks methods which do not change the state of the enclosing class. Marks fields/parameters/locals which state can not be changed. If an interface bears this annotation all subclasses must be immutable as well.