org.codehaus.groovy.transform
Class ASTTransformationVisitor

Field Summary
 CompilePhase phase
           
 SourceUnit source
           
 List targetNodes
           
 Map transforms
           
 
Constructor Summary
ASTTransformationVisitor(CompilePhase phase)
           
 
Method Summary
static void addGlobalTransforms(CompilationUnit compilationUnit)
          
static void addPhaseOperations(CompilationUnit compilationUnit)
          
SourceUnit getSourceUnit()
          
void visitAnnotations(AnnotatedNode node)
           Adds the annotation to the internal target list if a match is found.
void visitClass(ClassNode classNode)
           Main loop entry.
 

Constructor Detail

ASTTransformationVisitor

ASTTransformationVisitor(CompilePhase phase)


Method Detail

addGlobalTransforms

public static void addGlobalTransforms(CompilationUnit compilationUnit)


addPhaseOperations

public static void addPhaseOperations(CompilationUnit compilationUnit)


getSourceUnit

SourceUnit getSourceUnit()


visitAnnotations

public void visitAnnotations(AnnotatedNode node)
Adds the annotation to the internal target list if a match is found.
param:
node the node to be processed


visitClass

public void visitClass(ClassNode classNode)
Main loop entry.

First, it delegates to the super visitClass so we can collect the relevant annotations in an AST tree walk.

Second, it calls the visit method on the transformation for each relevant annotation found.

param:
classNode the class to visit