PsiAnnotation (@NotNull PsiModifierListOwner psiModifierListOwner, String @NotNull ... annotationFQNs) { for (String annotationFQN : annotationFQNs) { PsiAnnotation annotation = psiModifierListOwner.getAnnotation(annotationFQN); if (annotation != null) { return annotation; } } return null; }