PsiAnnotation (@NotNull String qualifiedName) { PsiModifierList list = myRecordComponent.getModifierList(); if (list == null) return null; PsiAnnotation annotation = list.findAnnotation(qualifiedName); if (annotation != null && AnnotationTargetUtil.findAnnotationTarget(annotation, myTargets) != null) { return annotation; } return null; }