Package org.codehaus.groovy.ast

Examples of org.codehaus.groovy.ast.ConstructorNode.addAnnotation()


                }
            } else {
                constructorNode = new ConstructorNode(Modifier.PUBLIC, constructorBody);
                classNode.addConstructor(constructorNode);
            }
            constructorNode.addAnnotation(new AnnotationNode(new ClassNode(GrailsDelegatingConstructor.class)));
            return constructorNode;
        }
        else {
            // create new constructor, restoring default constructor if there is none
            ConstructorNode cn = findConstructor(classNode, constructorParams);
View Full Code Here


  public void transformationOfAnnotationOnConstructor() {
    ClassNode classNode = new ClassNode("Test", 0, new ClassNode(Object.class));
    this.moduleNode.addClass(classNode);

    ConstructorNode constructorNode = new ConstructorNode(0, null);
    constructorNode.addAnnotation(this.grabAnnotation);
    classNode.addMethod(constructorNode);

    assertGrabAnnotationHasBeenTransformation();
  }
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.