String (@NotNull PsiAnnotation annotation, @NonNls String attr) { PsiElement value = annotation.findAttributeValue(attr); Object o = CONSTANT_EVALUATION_HELPER.computeConstantExpression(value); if (o instanceof String) { return (String)o; } return null; }