Annotation Interface Immutable


@Target(TYPE) @Retention(RUNTIME) public @interface Immutable
marks the specific class as immutable and the cloner avoids cloning it
Author:
kostantinos.kougios 24 Mar 2011
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    by default all subclasses of the @Immutable class are not immutable.
  • Element Details

    • subClass

      boolean subClass
      by default all subclasses of the @Immutable class are not immutable. This can override it.
      Returns:
      true for subclasses of @Immutable class to be regarded as immutable from the cloner
      Default:
      false