@Nullable
  public static PsiClass resolveClassInClassTypeOnly(@Nullable PsiType type) {
    return type instanceof PsiClassType ? ((PsiClassType)type).resolve() : null;
  }
@Nullable
  public static PsiClass resolveClassInClassTypeOnly(@Nullable PsiType type)