Package org.codehaus.groovy.ast.expr

Examples of org.codehaus.groovy.ast.expr.DeclarationExpression.addAnnotation()


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

    DeclarationExpression declarationExpression = new DeclarationExpression(
        new VariableExpression("test"), null, new ConstantExpression("test"));
    declarationExpression.addAnnotation(this.grabAnnotation);

    BlockStatement code = new BlockStatement(
        Arrays.asList((Statement) new ExpressionStatement(declarationExpression)),
        new VariableScope());
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.