Enum Class ImmutableProxyOption

java.lang.Object
java.lang.Enum<ImmutableProxyOption>
de.cronn.reflection.util.immutable.ImmutableProxyOption
All Implemented Interfaces:
Serializable, Comparable<ImmutableProxyOption>, Constable

public enum ImmutableProxyOption extends Enum<ImmutableProxyOption>
  • Enum Constant Details

    • ALLOW_CLONING_RECORDS

      public static final ImmutableProxyOption ALLOW_CLONING_RECORDS
      Allow cloning of records if at least one of the record components is not clearly an immutable type. Examples: record RecordWithPrimitives(int a, int b) {} record RecordWithList(List list) {} For records of type RecordWithPrimitives, no cloning is required since it only contains clearly immutable components. However, when creating an immutable proxy for an instance of RecordWithList, we need to clone the record and wrap the list component into an immutable proxy itself.
  • Method Details

    • values

      public static ImmutableProxyOption[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ImmutableProxyOption valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null