KaDeclarationContainerSymbol¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaDeclarationContainerSymbol : KaSymbol
A KaSymbol which may contain declarations. These declarations may be accessed through the KaScopes provided by KaScopeProvider.
Inheritors¶
Properties¶
anchorPsi¶
abstract val anchorPsi: PsiElement?
A PsiElement associated with the symbol. Usually, it is the best PsiElement representation for a particular KaSymbol.
combinedDeclaredMemberScope¶
context(session: KaSession)
val KaDeclarationContainerSymbol.combinedDeclaredMemberScope: KaScope
A KaScope containing all members explicitly declared in the given KaDeclarationContainerSymbol.
combinedMemberScope¶
context(session: KaSession)
val KaDeclarationContainerSymbol.combinedMemberScope: KaScope
A KaScope containing all members from memberScope and staticMemberScope.
containingDeclaration¶
context(session: KaSession)
val KaSymbol.containingDeclaration: KaDeclarationSymbol?
The KaDeclarationSymbol which contains this symbol, or null if there is no containing declaration:
containingFile¶
context(session: KaSession)
val KaSymbol.containingFile: KaFileSymbol?
The KaFileSymbol which contains this symbol, or null if this symbol is already a KaFileSymbol, since it has no containing file. Also null for Java and library declarations.
containingModule¶
context(session: KaSession)
val KaSymbol.containingModule: KaModule
The KaModule which contains this symbol.
containingSymbol¶
context(session: KaSession)
val KaSymbol.containingSymbol: KaSymbol?
The KaSymbol which contains this symbol, or null if there is no containing declaration:
declaredMemberScope¶
context(session: KaSession)
val KaDeclarationContainerSymbol.declaredMemberScope: KaScope
A KaScope containing the non-static callables (functions, properties, and constructors) and inner classes explicitly declared in the given KaDeclarationContainerSymbol.
defaultAnnotationTargets¶
context(session: KaSession)
val KaSymbol.defaultAnnotationTargets: Set<KaAnnotationTarget>?
A set of annotation targets matching for the given symbol, or null if the symbol cannot be annotated. Annotations with one of targets from the returned set can be placed on the KaSymbol without an explicit use-site target.
delegatedMemberScope¶
context(session: KaSession)
val KaDeclarationContainerSymbol.delegatedMemberScope: KaScope
A KaScope containing synthetic callables (functions and properties) created by interface delegation.
deprecation¶
context(session: KaSession)
val KaSymbol.deprecation: KaDeprecation?
The deprecation status of the given symbol, or null if the symbol is not deprecated.
importableFqName¶
context(session: KaSession)
val KaSymbol.importableFqName: FqName?
A FqName which can be used to import the given symbol, or null if the symbol cannot be imported.
isDeprecated¶
context(session: KaSession)
val KaSymbol.isDeprecated: Boolean
Whether the symbol is deprecated at any level.
isLocal¶
isTopLevel¶
val KaSymbol.isTopLevel: Boolean
Indicates whether a KaSymbol is at the top level.
location¶
abstract val location: KaSymbolLocation
The kind of location where a symbol is declared in code, e.g. KaSymbolLocation.TOP_LEVEL for top-level declarations.
memberScope¶
context(session: KaSession)
val KaDeclarationContainerSymbol.memberScope: KaScope
A KaScope containing non-static callable members (functions, properties, and constructors) and all classifier members (classes and objects) of the given KaDeclarationContainerSymbol. The scope includes members inherited from the symbol's supertypes, in addition to members which are declared explicitly inside the symbol's body.
name¶
origin¶
abstract val origin: KaSymbolOrigin
The kind of data source or generation the symbol originates from (e.g. source files, libraries, compiler plugins).
psi¶
abstract val psi: PsiElement?
The API is obsolete and will be deprecated soon. Use <strong>realPsi</strong> or <strong>anchorPsi</strong> instead.
realPsi¶
abstract val realPsi: PsiElement?
A PsiElement explicitly present in the code (source or library). This PsiElement is sufficient to restore the symbol via the symbol API without any additional information.
staticDeclaredMemberScope¶
context(session: KaSession)
val KaDeclarationContainerSymbol.staticDeclaredMemberScope: KaScope
A KaScope containing the static callables (functions and properties) and all classifiers (classes and objects) explicitly declared in the given KaDeclarationContainerSymbol.
staticMemberScope¶
context(session: KaSession)
val KaDeclarationContainerSymbol.staticMemberScope: KaScope
A KaScope containing the static members of the given KaDeclarationContainerSymbol.
token¶
abstract val token: KaLifetimeToken
The KaLifetimeToken which determines the lifetime of the lifetime owner.
Functions¶
assertIsValidAndAccessible¶
inline fun KaLifetimeOwner.assertIsValidAndAccessible()
createPointer¶
abstract override fun createPointer(): KaSymbolPointer<KaDeclarationContainerSymbol>
Creates a KaSymbolPointer which can be used to retrieve the symbol in a different analyze block (i.e. a different KaSession).
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.
psi¶
The API is obsolete and will be deprecated soon. Use <strong>realPsi</strong> or <strong>anchorPsi</strong> instead.
psiSafe¶
The API is obsolete and will be deprecated soon. Use <strong>realPsi</strong> or <strong>anchorPsi</strong> instead.
sourcePsi¶
The API is obsolete and will be deprecated soon. Use <strong>realPsi</strong> or <strong>anchorPsi</strong> instead.
sourcePsiSafe¶
inline fun <reified PSI : PsiElement> KaSymbol.sourcePsiSafe(): PSI?
The API is obsolete and will be deprecated soon. Use <strong>realPsi</strong> or <strong>anchorPsi</strong> instead.
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.