KaTypeCreatorProvider¶
@SubclassOptInRequired(markerClass = [KaSessionComponentImplementationDetail::class])
interface KaTypeCreatorProvider : KaSessionComponent
Provides an instance of KaTypeCreator to create various types.
Inheritors¶
Properties¶
token¶
abstract val token: KaLifetimeToken
The KaLifetimeToken which determines the lifetime of the lifetime owner.
typeCreator¶
abstract val typeCreator: KaTypeCreator
A single entry point for the type building infrastructure.
Functions¶
assertIsValidAndAccessible¶
inline fun KaLifetimeOwner.assertIsValidAndAccessible()
copy¶
abstract fun <T : KaClassType> T.copy(init: KaClassTypeBuilder.() -> Unit): KaClassType
Creates a copy of this KaClassType with modifications applied via the init block.
The builder is pre-populated with the properties of the original type. The init block can then selectively override these properties.
Example:
See also
abstract fun KaUsualClassType.copy(init: KaClassTypeBuilder.() -> Unit): KaUsualClassType
Creates a copy of this KaUsualClassType with modifications applied via the init block.
The builder is pre-populated with the properties of the original type. The init block can then selectively override these properties.
Example:
See also
abstract fun KaFunctionType.copy(init: KaFunctionTypeBuilder.() -> Unit): KaFunctionType
Creates a copy of this KaFunctionType with modifications applied via the init block.
The builder is pre-populated with the properties of the original type. The init block can then selectively override these properties.
Example:
See also
abstract fun KaTypeParameterType.copy(init: KaTypeParameterTypeBuilder.() -> Unit): KaTypeParameterType
Creates a copy of this KaTypeParameterType with modifications applied via the init block.
The builder is pre-populated with the properties of the original type. The init block can then selectively override these properties.
Example:
See also
isValid¶
fun KaLifetimeOwner.isValid(): Boolean
Whether the lifetime owner is still valid, i.e. we are still in the scope of the lifetime owner's regular lifetime.
withValidityAssertion¶
inline fun <R> KaLifetimeOwner.withValidityAssertion(action: () -> R): R
Executes action only if the KaLifetimeOwner is still valid and accessible. Otherwise, throws a validity exception based on the concrete violation.