Module nbbrd.design
Package nbbrd.design

Annotation Type Immutable


  • @Target(TYPE)
    @Retention(SOURCE)
    @Documented
    public @interface Immutable
    The visible state of objects of this class doesn't change after their creation. Those objects should not be cloned or copied. They are thread safe General rules: - the object is fully initialized in the constructor (fields should be final) - the class should be final Special cases: - the initialization of some fields could be delayed, for performances issues. - in that case, the internal code should preserve the integrity of the object in a multi-threaded context.
    Author:
    Jean Palate
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean lazy  
    • Element Detail

      • lazy

        boolean lazy
        Default:
        false