public static void addExpressionToAnnotationMember ( AnnotationNode annotationNode , String memberName , Expression expression ) { Expression exclude = annotationNode . getMember ( memberName ) ; if ( exclude instanceof ListExpression ) { ( ( ListExpression ) exclude ) . addExpression ( expression ) ; } else if ( exclude != null ) { ListExpression list = new ListExpression ( ) ; list . addExpression ( exclude ) ; list . addExpression ( expression ) ; annotationNode . setMember ( memberName , list ) ; } else { annotationNode . setMember ( memberName , expression ) ; } }
Adds the given expression as a member of the given annotation