KaVisibilityChecker¶
@SubclassOptInRequired(markerClass = [KaSessionComponentImplementationDetail::class])
interface KaVisibilityChecker : KaSessionComponent
Inheritors¶
Properties¶
token¶
abstract val token: KaLifetimeToken
The KaLifetimeToken which determines the lifetime of the lifetime owner.
Functions¶
assertIsValidAndAccessible¶
inline fun KaLifetimeOwner.assertIsValidAndAccessible()
createUseSiteVisibilityChecker¶
abstract fun createUseSiteVisibilityChecker(
useSiteFile: KaFileSymbol,
receiverExpression: KtExpression? = null,
position: PsiElement
): KaUseSiteVisibilityChecker
Creates a visibility checker for the given use-site position.
Parameters
- receiverExpression: The dispatch receiver expression which the candidate symbol is called on, if applicable.
See also
isPublicApi¶
abstract fun isPublicApi(symbol: KaDeclarationSymbol): Boolean
Whether the symbol is effectively public, including internal declarations with the PublishedApi annotation.
In 'Explicit API' mode, explicit visibility modifiers and explicit return types are required for such symbols.
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.
isVisibleInClass¶
abstract fun KaCallableSymbol.isVisibleInClass(classSymbol: KaClassSymbol): Boolean
Checks whether the given KaCallableSymbol (possibly inherited from a superclass) is visible in the given classSymbol.
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.