boolean (PsiElement maybeClass) { if (!(maybeClass instanceof PsiClass declaredClass)) return false; if (myClassName.startsWith("com.sun.proxy.$Proxy")) return true; String declaredName = declaredClass.getQualifiedName(); if (myClassName.equals(declaredName)) return true; PsiClass calledClass = ClassUtil.findPsiClass(maybeClass.getManager(), myClassName, declaredClass, true); if (calledClass == null) { calledClass = ClassUtil.findPsiClass(maybeClass.getManager(), myClassName, null, true); } return calledClass == declaredClass || declaredName != null && InheritanceUtil.isInheritor(calledClass, false, declaredName); }