boolean (@NotNull UMethod uMethod, @Nullable RefClass ownerRefClass) { if (ownerRefClass == null) return false; if (!PsiUtil.isLanguageLevel8OrHigher(uMethod.getJavaPsi())) return false; if (!"value".equals(uMethod.getName())) return false; if (!ownerRefClass.isAnnotationType()) return false; PsiType returnType = uMethod.getReturnType(); if (!(returnType instanceof PsiArrayType)) return false; PsiClass returnTypeClass = PsiUtil.resolveClassInType(returnType); if (returnTypeClass == null || !returnTypeClass.isAnnotationType()) return false; RefElement repeatableAnn = ownerRefClass.getRefManager().getReference(returnTypeClass); if (repeatableAnn == null || !repeatableAnn.isReferenced()) return false; PsiAnnotation repeatableAnnContainer = returnTypeClass.getAnnotation(CommonClassNames.JAVA_LANG_ANNOTATION_REPEATABLE); if (repeatableAnnContainer == null) return false; return AnnotationsHighlightUtil.doCheckRepeatableAnnotation(repeatableAnnContainer) == null; }