String (@NotNull PsiAnnotationMemberValue attrValue) { PsiConstantEvaluationHelper evaluationHelper = JavaPsiFacade.getInstance(attrValue.getProject()).getConstantEvaluationHelper(); Object constValue = evaluationHelper.computeConstantExpression(attrValue); return constValue instanceof String ? (String)constValue : null; }