List<PsiClass> () { List<PsiClass> result = new ArrayList<>(); Collection<PsiAnnotation> annotations = JavaAnnotationIndex.getInstance().getAnnotations(StringUtil.getShortName( Jsr305Support.TYPE_QUALIFIER_NICKNAME), myProject, GlobalSearchScope.allScope(myProject)); for (PsiAnnotation annotation : annotations) { PsiElement context = annotation.getContext(); if (context instanceof PsiModifierList && context.getContext() instanceof PsiClass ownerClass && ownerClass.isAnnotationType() && Jsr305Support.isNullabilityNickName(ownerClass)) { result.add(ownerClass); } } return result; }