Optional<AnnotationProvider> (PsiFile file, PsiModifierListOwner owner, String annotationShortName) { return availableAnnotations(owner, file.getProject()) .filter(p -> StringUtil.getShortName(p.getName(file.getProject())).equals(annotationShortName)) .collect(MoreCollectors.onlyOne()); }