Package org.codehaus.groovy.ast

Examples of org.codehaus.groovy.ast.AnnotationNode.addMember()


            verifier = new Verifier() {
              @Override
              public void visitClass(ClassNode node) {
                if (node.implementsInterface(ClassHelper.GENERATED_CLOSURE_Type)) {
                  AnnotationNode lineNumberAnnotation = new AnnotationNode(LINE_NUMBER_CLASS_NODE);
                  lineNumberAnnotation.addMember("value", new ConstantExpression(node.getLineNumber(), true));
                  node.addAnnotation(lineNumberAnnotation);
                }

                super.visitClass(node);
              }
View Full Code Here


    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 {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.