[FIR] Add methods to collect all class and callable ids from extensions

They will be needed for generating IR for all declarations from plugins
This commit is contained in:
Dmitriy Novozhilov
2021-09-30 16:12:54 +03:00
committed by TeamCityServer
parent 9baf10cfcc
commit 79f1779d89
3 changed files with 20 additions and 1 deletions
@@ -38,8 +38,11 @@ abstract class FirDeclarationGenerationExtension(session: FirSession) : FirPredi
// Can be called on IMPORTS stage
open fun hasPackage(packageFqName: FqName): Boolean = false
// Can be called after BODY_RESOLVE stage (checkers and fir2ir)
open fun getCallableNamesForClass(classSymbol: FirClassSymbol<*>): Set<Name> = emptySet()
open fun getNestedClassifiersNames(classSymbol: FirClassSymbol<*>): Set<Name> = emptySet()
open fun getTopLevelCallableIds(): Set<CallableId> = emptySet()
open fun getTopLevelClassIds(): Set<ClassId> = emptySet()
fun interface Factory : FirExtension.Factory<FirDeclarationGenerationExtension>
}