Enum Class ClonePolicy

java.lang.Object
java.lang.Enum<ClonePolicy>
cloud.opencode.base.deepclone.ClonePolicy
All Implemented Interfaces:
Serializable, Comparable<ClonePolicy>, Constable

public enum ClonePolicy extends Enum<ClonePolicy>
Clone policy enum defining the cloning behavior 克隆策略枚举,定义克隆行为

Different policies control how strictly the cloner handles errors and edge cases during the cloning process.

不同的策略控制克隆器在克隆过程中如何严格处理错误和边界情况。

Policies | 策略:

  • STANDARD - Default behavior, balanced error handling - 默认行为,平衡的错误处理
  • STRICT - Fail fast on any error - 任何错误时快速失败
  • LENIENT - Best effort, skip errors - 尽力而为,跳过错误
Since:
JDK 25, opencode-base-deepclone V1.0.3
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Enum Constant Details

    • STANDARD

      public static final ClonePolicy STANDARD
      Standard cloning policy with balanced error handling 标准克隆策略,平衡的错误处理
    • STRICT

      public static final ClonePolicy STRICT
      Strict cloning policy that fails fast on any error 严格克隆策略,任何错误时快速失败
    • LENIENT

      public static final ClonePolicy LENIENT
      Lenient cloning policy that skips errors and continues 宽松克隆策略,跳过错误并继续
  • Method Details

    • values

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