Get child classes

Hi all!

How can I programmatically get all implmenting from class "A" classes. I need find it in module libraries and in src folder.
Thanks, Victor!

3 comments
Comment actions Permalink

Hello Victor,

How can I programmatically get all implmenting from class "A" classes.
I need find it in module libraries and in src folder.


ClassInheritorsSearch.search(class, module.getModuleWithLibrariesScope(),
true);

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Thanks, Dmitry!
Now I need filter in this array all not public and abstract classes only. How can I do this?

0
Comment actions Permalink

Hello Victor,

Thanks, Dmitry!
Now I need filter in this array all not public and abstract classes
only. How can I do this?


PsiClass.hasModifierProperty(PsiModifier.PUBLIC)
PsiClass.hasModifierProperty(PsiModifier.ABSTRACT)


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.