How to get all classes that extends specific class

Hi All,

I want to get list of classes that extends specific class.

I am trying to get list of the classes with :

PsiShortNamesCache psnc = PsiShortNamesCache.getInstance(project);
String[] names = psnc.getAllClassNames();


And then watch for every class. But getAllClassNames returns to much records.

Possibly there is another way to get classes from project or module?
Thanks in advance.

2 comments
Comment actions Permalink

Use the ClassInheritorsSearch.search() method.


0
Comment actions Permalink

Thanks, it works for me

0

Please sign in to leave a comment.