boolean (PsiClass aClass, String shortName) { String actualName = aClass.getName(); if (shortName.equals(actualName)) return true; String afterDollar = StringUtil.getShortName(shortName, '$'); if (actualName != null) { if (!actualName.equals(afterDollar)) return false; } else { if (!afterDollar.matches("\\d+")) return false; } PsiClass containingClass = ClassUtils.getContainingClass(aClass); String prefix = StringUtil.substringBefore(shortName, "$"); if (prefix == null) { return containingClass == null; } return containingClass != null && classNameMatches(containingClass, prefix); }