Skip to content

KaSignatureSubstitutor

@SubclassOptInRequired(markerClass = [KaSessionComponentImplementationDetail::class])
interface KaSignatureSubstitutor : KaSessionComponent

Inheritors

Properties

token

abstract val token: KaLifetimeToken

The KaLifetimeToken which determines the lifetime of the lifetime owner.

Functions

assertIsValidAndAccessible

asSignature

Creates a new KaCallableSignature for the given symbol and leaves all types unsubstituted.

Creates a new KaFunctionSignature for the given symbol and leaves all types unsubstituted.

Creates a new KaVariableSignature for the given symbol and leaves all types unsubstituted.

isValid

Whether the lifetime owner is still valid, i.e. we are still in the scope of the lifetime owner's regular lifetime.

substitute

abstract fun <S : KaCallableSymbol> S.substitute(substitutor: KaSubstitutor): KaCallableSignature<S>

Applies a substitutor to the given symbol and returns a KaCallableSignature with substituted types.

See also

abstract fun <S : KaFunctionSymbol> S.substitute(substitutor: KaSubstitutor): KaFunctionSignature<S>

Applies a substitutor to the given symbol and returns a KaFunctionSignature with substituted types.

See also

abstract fun <S : KaVariableSymbol> S.substitute(substitutor: KaSubstitutor): KaVariableSignature<S>

Applies a substitutor to the given symbol and returns a KaVariableSignature with substituted types.

See also

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.