KaSubstitutorBuilder¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaSubstitutorBuilder : KaLifetimeOwner
A DSL builder for KaSubstitutor.
See also¶
Inheritors¶
Properties¶
mappings¶
abstract val mappings: Map<KaTypeParameterSymbol, KaType>
A map of the type substitutions that have so far been accumulated by the builder.
token¶
abstract val token: KaLifetimeToken
The KaLifetimeToken which determines the lifetime of the lifetime owner.
Functions¶
assertIsValidAndAccessible¶
inline fun KaLifetimeOwner.assertIsValidAndAccessible()
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.
substitution¶
abstract fun substitution(typeParameter: KaTypeParameterSymbol, type: KaType)
Adds a new typeParameter ->type substitution to the substitutor.
If there already was a substitution with a typeParameter, the function replaces the corresponding substitution with a new one.
substitutions¶
abstract fun substitutions(substitutions: Map<KaTypeParameterSymbol, KaType>)
Adds new KaTypeParameterSymbol ->KaType substitutions to the substitutor.
If there already was a substitution with a KaTypeParameterSymbol, the function replaces the corresponding substitution with a new one.
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.