@Nullable
  public static PsiClass findClass(@Nullable String name,
                                   @NotNull PsiFile file,
                                   @Nullable final Module module,
                                   @Nullable GlobalSearchScope searchScope, boolean searchAnonymous) {
    if (name == null) return null;
    searchScope = searchScope != null ? searchScope : calcScope(file, module);
    final PsiClass aClass;
    if (searchAnonymous) {
      aClass = ClassUtil.findPsiClass(file.getManager(), name, null, false, searchScope);
    }
    else {
      String fqn = name.indexOf('$') >= 0 ? name.replace('$', '.') : name;
      aClass = JavaPsiFacade.getInstance(file.getProject()).findClass(fqn, searchScope);
    }
    if (aClass != null) {
      assert aClass.isValid() : name;
    }
    return aClass;
  }
@Nullable
  public static PsiClass findClass(@Nullable String name,
                                   @NotNull PsiFile file,
                                   @Nullable final Module module,
                                   @Nullable GlobalSearchScope searchScope, boolean searchAnonymous)