Enum Class CopyAction

java.lang.Object
java.lang.Enum<CopyAction>
io.github.sugarcubes.cloner.CopyAction
All Implemented Interfaces:
Serializable, Comparable<CopyAction>, Constable

public enum CopyAction extends Enum<CopyAction>
Actions which can be applied to objects, types and fields: what the clone gets instead of the original value.
  • Enum Constant Details

    • DEFAULT

      public static final CopyAction DEFAULT
      Clone the object, unless it is immutable or shared by default. For policies: the policy does not decide.
    • ORIGINAL

      public static final CopyAction ORIGINAL
      Use the original object.
    • CLEAR

      public static final CopyAction CLEAR
      The clone gets null; a primitive field gets its default value, 0 or false. Field initializers do not run, the clones are created without constructors.
  • Method Details

    • values

      public static CopyAction[] 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 CopyAction 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