home | career | drupal | java | mac | mysql | perl | scala | uml | unix

Groovy example source code file (G3839Transform1.java)

This example Groovy source code file (G3839Transform1.java) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Groovy tags/keywords

acc_public, acc_public, asttransformation, classnode, classnode, fieldnode, g3839transform1, groovyasttransformation, groovyasttransformation, opcodes, sourceunit, sourceunit

The Groovy G3839Transform1.java source code

package groovy.bugs;

import org.objectweb.asm.Opcodes;

import org.codehaus.groovy.ast.*;
import org.codehaus.groovy.control.*;
import org.codehaus.groovy.transform.*;

@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION)
public class G3839Transform1 implements ASTTransformation, Opcodes{

    public void visit(ASTNode[] nodes, SourceUnit sourceUnit) {
        ClassNode classNode = (ClassNode) nodes[1];
        classNode.addField(new FieldNode("f1", ACC_PUBLIC, ClassHelper.OBJECT_TYPE, classNode, null));


Other Groovy examples (source code examples)

Here is a short list of links related to this Groovy G3839Transform1.java source code file:

new blog posts


Copyright 1998-2014 Alvin Alexander, alvinalexander.com
All Rights Reserved.