PsiAnnotation (@Nullable PsiModifierListOwner listOwner, @NotNull Collection<String> annotationNames, boolean skipExternal) { if (listOwner == null) return null; List<PsiAnnotation> result = findAllAnnotations(listOwner, annotationNames, skipExternal); return result.isEmpty() ? null : result.get(0); }