org.jetbrains.kotlin.analysis.api.scopes¶
Types¶
KaScope¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaScope : KaScopeLike
A KaScope provides access to the declarations contained in a specific declaration, file, or package, such as classes, type aliases, functions, properties, and constructors.
KaScopeLike¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaScopeLike : KaLifetimeOwner
KaTypeScope¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaTypeScope : KaScopeLike
A scope which contains members whose use-site type parameters have been substituted with the type arguments of a concrete KaType. Callable declarations with substituted type parameters are represented as KaCallableSignature.
Properties¶
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.
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.
delegatedMemberScope¶
context(session: KaSession)
val KaDeclarationContainerSymbol.delegatedMemberScope: KaScope
A KaScope containing synthetic callables (functions and properties) created by interface delegation.
fileScope¶
context(session: KaSession)
val KaFileSymbol.fileScope: KaScope
A KaScope containing the top-level declarations (such as classes, functions and properties) in the given KaFileSymbol.
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.
packageScope¶
context(session: KaSession)
val KaPackageSymbol.packageScope: KaScope
A KaScope containing all members of the package represented by the given KaPackageSymbol, not including members of subpackages.
scope¶
context(session: KaSession)
val KaType.scope: KaTypeScope?
A KaTypeScope for the given KaType, or null if the type is erroneous. The scope includes all members which are callable on a given type. It also includes synthetic Java properties.
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.
syntheticJavaPropertiesScope¶
context(session: KaSession)
val KaType.syntheticJavaPropertiesScope: KaTypeScope?
A KaTypeScope containing the synthetic Java properties created for a given KaType.
Functions¶
asCompositeScope¶
context(session: KaSession)
fun List<KaScope>.asCompositeScope(): KaScope