private static @Nullable PsiClass resolveAnnotationType(@NotNull PsiAnnotation psiAnnotation) {
    PsiClass psiClass = psiAnnotation.resolveAnnotationType();
    if (psiClass != null) return psiClass;

    String annotationQualifiedName = psiAnnotation.getQualifiedName();
    if (annotationQualifiedName == null) return null;

    return JavaPsiFacade.getInstance(psiAnnotation.getProject()).findClass(annotationQualifiedName, psiAnnotation.getResolveScope());
  }
private static @Nullable PsiClass resolveAnnotationType(@NotNull PsiAnnotation psiAnnotation)