AnnotationNode securedAnnotationNode = new AnnotationNode(SECURED);
List<Expression> nameExpressions = new ArrayList<Expression>();
for (String authorityName : authorityNames) {
nameExpressions.add(new ConstantExpression(authorityName));
}
securedAnnotationNode.addMember("value", new ListExpression(nameExpressions));
return securedAnnotationNode;
}
protected String[] getAuthorityNames(final String fieldName, final AnnotationNode rolesNode, final SourceUnit sourceUnit) throws IOException {