KotlinCompositeDeclarationProvider¶
class KotlinCompositeDeclarationProvider : KotlinDeclarationProvider, KotlinCompositeProvider<KotlinDeclarationProvider>
A composite KotlinDeclarationProvider which combines all declarations provided by its child providers. It should be created with KotlinCompositeDeclarationProvider.create.
Types¶
Companion¶
object Companion
Properties¶
hasSpecificCallablePackageNamesComputation¶
open override val hasSpecificCallablePackageNamesComputation: Boolean
Whether the declaration provider has a specific implementation of computePackageNamesWithTopLevelCallables. This allows the Analysis API backend to determine whether callable package sets are computed and cached separately or with computePackageNames.
hasSpecificClassifierPackageNamesComputation¶
open override val hasSpecificClassifierPackageNamesComputation: Boolean
Whether the declaration provider has a specific implementation of computePackageNamesWithTopLevelClassifiers. This allows the Analysis API backend to determine whether classifier package sets are computed and cached separately or with computePackageNames.
providers¶
open override val providers: List<KotlinDeclarationProvider>
Functions¶
computePackageNames¶
open override fun computePackageNames(): Set<String>?
Calculates the set of package names which can be provided by this declaration provider.
The set may contain false positives. null may be returned if the package set is too expensive or impossible to compute.
computePackageNames is used as the default implementation for computePackageNamesWithTopLevelClassifiers and computePackageNamesWithTopLevelCallables if either returns null. It depends on the declaration provider whether it's worth computing separate package sets for classifiers and callables, or just one set containing all package names.
computePackageNamesWithTopLevelCallables¶
open override fun computePackageNamesWithTopLevelCallables(): Set<String>?
Calculates the set of package names which contain callables and can be provided by this declaration provider.
The set may contain false positives. null may be returned if the package set is too expensive or impossible to compute.
computePackageNamesWithTopLevelClassifiers¶
open override fun computePackageNamesWithTopLevelClassifiers(): Set<String>?
Calculates the set of package names which contain classifiers and can be provided by this declaration provider.
The set may contain false positives. null may be returned if the package set is too expensive or impossible to compute.
findFilesForFacade¶
open override fun findFilesForFacade(facadeFqName: FqName): Collection<KtFile>
findFilesForFacadeByPackage¶
open override fun findFilesForFacadeByPackage(packageFqName: FqName): Collection<KtFile>
findFilesForScript¶
open override fun findFilesForScript(scriptFqName: FqName): Collection<KtScript>
findInternalFilesForFacade¶
open override fun findInternalFilesForFacade(facadeFqName: FqName): Collection<KtFile>
Currently we want only classes from libraries.
getAllClassesByClassId¶
open override fun getAllClassesByClassId(classId: ClassId): Collection<KtClassOrObject>
getAllTypeAliasesByClassId¶
open override fun getAllTypeAliasesByClassId(classId: ClassId): Collection<KtTypeAlias>
getClassLikeDeclarationByClassId¶
open override fun getClassLikeDeclarationByClassId(classId: ClassId): KtClassLikeDeclaration?
Returns a KtClassLikeDeclaration that has the given classId, or null if no such declaration exists.
getClassLikeDeclarationByClassId does not guarantee a stable result for ambiguous class IDs. If multiple declarations share the same class ID, the declaration provider may return any one of them. To get a list of all possibilities, getAllClassesByClassId and getAllTypeAliasesByClassId should be used instead.
getTopLevelCallableFiles¶
open override fun getTopLevelCallableFiles(callableId: CallableId): Collection<KtFile>
getTopLevelCallableNamesInPackage¶
open override fun getTopLevelCallableNamesInPackage(packageFqName: FqName): Set<Name>
getTopLevelFunctions¶
open override fun getTopLevelFunctions(callableId: CallableId): Collection<KtNamedFunction>
getTopLevelKotlinClassLikeDeclarationNamesInPackage¶
open override fun getTopLevelKotlinClassLikeDeclarationNamesInPackage(packageFqName: FqName): Set<Name>
getTopLevelProperties¶
open override fun getTopLevelProperties(callableId: CallableId): Collection<KtProperty>