Transient
Marks the backing field of the annotated property with the transient
modifier on the JVM platform, meaning that it is not a part of the serialized form of the object when serialized with java.io.Serializable
machinery.
Warning: the java.io.Serializable
is an unsound mechanism that bypasses classes' invariants. When @Transient
annotation is applied to a property, the author must ensure that either the property has a nullable type or that an author-supplied readResolve
is implemented, supplying a conforming value for the non-nullable transient property.
See also: "Java Object Serialization Specification"
Since Kotlin
1.0Marks the backing field of the annotated property with the transient
modifier on the JVM platform, meaning that it is not a part of the serialized form of the object when serialized with java.io.Serializable
machinery.
Warning: the java.io.Serializable
is an unsound mechanism that bypasses classes' invariants. When @Transient
annotation is applied to a property, the author must ensure that either the property has a nullable type or that an author-supplied readResolve
is implemented, supplying a conforming value for the non-nullable transient property.
See also: "Java Object Serialization Specification"