boolean (@NotNull PsiModifierListOwner modifierListOwner, @NotNull Collection<String> annotationNames) { for (PsiAnnotation psiAnnotation : modifierListOwner.getAnnotations()) { final String shortName = getShortNameOf(psiAnnotation); if (annotationNames.contains(shortName)) { return true; } } return false; }