void (@NotNull GrAnnotationNameValuePair nameValuePair) { if (myExpression.equals(nameValuePair.getValue())) { final PsiClass annot = ResolveUtil.resolveAnnotation(nameValuePair.getParent()); if (annot != null) { final String name = nameValuePair.getName(); if (name != null) { createResultFromAttrName(annot, name); } else { final PsiMethod[] valueAttr = annot.findMethodsByName("value", false); if (valueAttr.length > 0) { boolean canHaveSimpleExpr = ContainerUtil.find(annot.getMethods(), method -> !("value".equals(method.getName()) || method instanceof PsiAnnotationMethod && ((PsiAnnotationMethod)method).getDefaultValue() != null)) == null; if (canHaveSimpleExpr) { createResultFromAnnotationAttribute(valueAttr[0]); } } } } } }