private static boolean classNameMatches(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 = PsiUtil.getContainingClass(aClass);
    String prefix = StringUtil.substringBefore(shortName, "$");
    if (prefix == null) {
      return containingClass == null;
    }
    return containingClass != null && classNameMatches(containingClass, prefix);
  }
private static boolean classNameMatches(PsiClass aClass, String shortName)