Annotation Type Immutable


  • @Documented
    @Target({TYPE,FIELD})
    public @interface Immutable
    Annotates a class that cannot be changed after construction or a field that cannot be modified after initialization. This is broadly similar to the Java Concurrency in Practice annotation, except that it can also be applied to a field to mark fields as immutable - for example a List field that is initialized using Collections.unmodifiableList(List);
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String value
      Optional description
    • Element Detail

      • value

        java.lang.String value
        Optional description
        Returns:
        the description for this annotation
        Default:
        ""