Package org.codehaus.groovy.ast

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


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

    Parameter parameter = new Parameter(new ClassNode(Object.class), "test");
    parameter.addAnnotation(this.grabAnnotation);

    MethodNode methodNode = new MethodNode("test", 0, new ClassNode(Void.class),
        new Parameter[] { parameter }, new ClassNode[0], null);
    classNode.addMethod(methodNode);
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.