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 Summary
ConstructorsConstructorDescriptionReflectiveConfig(boolean cloneTransient, boolean useFieldCache, boolean respectAnnotations) Creates an instance of aReflectiveConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecloneTransientrecord component.defaults()Creates default configuration 创建默认配置final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of therespectAnnotationsrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theuseFieldCacherecord component.
-
Constructor Details
-
ReflectiveConfig
public ReflectiveConfig(boolean cloneTransient, boolean useFieldCache, boolean respectAnnotations) Creates an instance of aReflectiveConfigrecord class.- Parameters:
cloneTransient- the value for thecloneTransientrecord componentuseFieldCache- the value for theuseFieldCacherecord componentrespectAnnotations- the value for therespectAnnotationsrecord component
-
-
Method Details
-
defaults
Creates default configuration 创建默认配置- Returns:
- the default config | 默认配置
-
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
cloneTransient
public boolean cloneTransient()Returns the value of thecloneTransientrecord component.- Returns:
- the value of the
cloneTransientrecord component
-
useFieldCache
public boolean useFieldCache()Returns the value of theuseFieldCacherecord component.- Returns:
- the value of the
useFieldCacherecord component
-
respectAnnotations
public boolean respectAnnotations()Returns the value of therespectAnnotationsrecord component.- Returns:
- the value of the
respectAnnotationsrecord component
-