Find KtClass inheritors
Answered
Hi,
Finding inheritors for PsiClass is possible via `DirectClassInheritorsSearch.search(PsiClass)` is there a similar mechanism for KtClass? I've only found `KotlinDirectInheritorsSearcher` but it also recieves PsiClass as search parameter and it's unclear if it's even possible to convert KtClass to PsiClass.
Thanks!
Please sign in to leave a comment.
Hi,
You can use HierarchySearchRequest with searchInheritors() extension. Another way – you can convert `KtClass` to `PsiClass` by `toLightClass()` or `toLightClassWithBuiltinMapping()` extension functions
Thanks, Dmitrii