Record Class ReflectiveCloner.ReflectiveConfig

java.lang.Object
java.lang.Record
cloud.opencode.base.deepclone.cloner.ReflectiveCloner.ReflectiveConfig
Record Components:
cloneTransient - whether to clone transient fields | 是否克隆transient字段
useFieldCache - whether to cache field metadata | 是否缓存字段元数据
respectAnnotations - whether to respect clone annotations | 是否遵守克隆注解
Enclosing class:
ReflectiveCloner

public static record ReflectiveCloner.ReflectiveConfig(boolean cloneTransient, boolean useFieldCache, boolean respectAnnotations) extends Record
Configuration for ReflectiveCloner ReflectiveCloner的配置
Since:
JDK 25, opencode-base-deepclone V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Constructor Details

    • ReflectiveConfig

      public ReflectiveConfig(boolean cloneTransient, boolean useFieldCache, boolean respectAnnotations)
      Creates an instance of a ReflectiveConfig record class.
      Parameters:
      cloneTransient - the value for the cloneTransient record component
      useFieldCache - the value for the useFieldCache record component
      respectAnnotations - the value for the respectAnnotations record component
  • Method Details

    • defaults

      public static ReflectiveCloner.ReflectiveConfig defaults()
      Creates default configuration 创建默认配置
      Returns:
      the default config | 默认配置
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • cloneTransient

      public boolean cloneTransient()
      Returns the value of the cloneTransient record component.
      Returns:
      the value of the cloneTransient record component
    • useFieldCache

      public boolean useFieldCache()
      Returns the value of the useFieldCache record component.
      Returns:
      the value of the useFieldCache record component
    • respectAnnotations

      public boolean respectAnnotations()
      Returns the value of the respectAnnotations record component.
      Returns:
      the value of the respectAnnotations record component