@Nullable
  public static PsiClass findPsiClass(@NotNull PsiManager manager,
                                      @NotNull String name,
                                      @Nullable PsiClass parent,
                                      boolean jvmCompatible,
                                      @NotNull GlobalSearchScope scope) {
    if (parent != null) {
      return findSubClass(name, parent, jvmCompatible);
    }

    PsiClass result = JavaPsiFacade.getInstance(manager.getProject()).findClass(name, scope);
    if (result != null) return result;

    int p = 0;
    while ((p = name.indexOf('$', p + 1)) > 0 && p < name.length() - 1) {
      String prefix = name.substring(0, p);
      parent = JavaPsiFacade.getInstance(manager.getProject()).findClass(prefix, scope);
      if (parent != null) {
        String suffix = name.substring(p + 1);
        result = findSubClass(suffix, parent, jvmCompatible);
        if (result != null) return result;
      }
    }

    return null;
  }
@Nullable
  public static PsiClass findPsiClass(@NotNull PsiManager manager,
                                      @NotNull String name,
                                      @Nullable PsiClass parent,
                                      boolean jvmCompatible,
                                      @NotNull GlobalSearchScope scope)