boolean (PsiClass psiClass, ElementPattern pattern, final ProcessingContext matchingContext, boolean checkThisClass) { if (psiClass == null) return false; if (checkThisClass && pattern.accepts(psiClass, matchingContext)) return true; if (isInheritor(psiClass.getSuperClass(), pattern, matchingContext, true)) return true; for (final PsiClass aClass : psiClass.getInterfaces()) { if (isInheritor(aClass, pattern, matchingContext, true)) return true; } return false; }