public class TransientProperty<T>
A simple wrapper that enables the use of Kotlin's "val x by TransientProperty { ... }" syntax. Such a property will not be serialized to disk, and if it's missing (or the first time it's accessed), the initializer will be used to set it up. Note that the initializer will be called with the TransientProperty object locked.
Constructor and Description |
---|
TransientProperty(kotlin.jvm.functions.Function0<? extends T> initializer)
A simple wrapper that enables the use of Kotlin's "val x by TransientProperty { ... }" syntax. Such a property
will not be serialized to disk, and if it's missing (or the first time it's accessed), the initializer will be
used to set it up. Note that the initializer will be called with the TransientProperty object locked.
|
Modifier and Type | Method and Description |
---|---|
T |
getValue(java.lang.Object thisRef,
kotlin.reflect.KProperty<?> property) |
public TransientProperty(kotlin.jvm.functions.Function0<? extends T> initializer)
A simple wrapper that enables the use of Kotlin's "val x by TransientProperty { ... }" syntax. Such a property will not be serialized to disk, and if it's missing (or the first time it's accessed), the initializer will be used to set it up. Note that the initializer will be called with the TransientProperty object locked.