Skip to content

org.jetbrains.kotlin.analysis.api.scopes

Types

KaScope

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

KaTypeScope

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

A KaScope containing all members explicitly declared in the given KaDeclarationContainerSymbol.

combinedMemberScope

A KaScope containing all members from memberScope and staticMemberScope.

declaredMemberScope

A KaScope containing the non-static callables (functions, properties, and constructors) and inner classes explicitly declared in the given KaDeclarationContainerSymbol.

delegatedMemberScope

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

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

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

A KaScope containing the static callables (functions and properties) and all classifiers (classes and objects) explicitly declared in the given KaDeclarationContainerSymbol.

staticMemberScope

A KaScope containing the static members of the given KaDeclarationContainerSymbol.

syntheticJavaPropertiesScope

A KaTypeScope containing the synthetic Java properties created for a given KaType.

Functions

asCompositeScope

context(session: KaSession)
fun List<KaScope>.asCompositeScope(): KaScope

Combines a list of KaScopes into a single composite KaScope. The resulting scope contains all members of its constituent scopes.