Does PsiClass have an equivalent to java.lang.Class.isAssignableFrom(Class cls)?
Classes are not assignable (whatever reflection API says). Types are. So you will have to create a PsiClassType from PsiClass (use PsiElementFactory for that), and use isAssignableFrom for them.
Alternatively, there is a PsiClass.isInheritor(), but it is obviously not equivalent to isAssignable().
Cheers, Dmitry -- Dmitry Lomov Software Developer JetBrains Inc. http://www.jetbrains.com "Develop with pleasure!"
Jon Steelman wrote:
Classes are not assignable (whatever reflection API says).
Types are. So you will have to create a PsiClassType from PsiClass
(use PsiElementFactory for that), and use isAssignableFrom for them.
Alternatively, there is a PsiClass.isInheritor(), but it is obviously not
equivalent to isAssignable().
Cheers,
Dmitry
--
Dmitry Lomov
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"