String (@NotNull PsiAnnotation annotation, final String attributeName, String defaultValue) { PsiAnnotationMemberValue value = annotation.findAttributeValue(attributeName); if (value instanceof GrExpression) { Object o = GroovyConstantExpressionEvaluator.evaluate((GrExpression)value); if (o instanceof String) { return (String)o; } } return defaultValue; }