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