org.codehaus.groovy.transform
Class NewifyASTTransformation

java.lang.Object
  extended by org.codehaus.groovy.ast.CodeVisitorSupport
      extended by org.codehaus.groovy.ast.ClassCodeVisitorSupport
          extended by org.codehaus.groovy.ast.ClassCodeExpressionTransformer
              extended by org.codehaus.groovy.transform.NewifyASTTransformation
All Implemented Interfaces:
ExpressionTransformer, GroovyClassVisitor, GroovyCodeVisitor, ASTTransformation

public class NewifyASTTransformation
extends ClassCodeExpressionTransformer
implements ASTTransformation

Handles generation of code for the @Newify annotation.

Author:
Paul King

Constructor Summary
NewifyASTTransformation()
           
 
Method Summary
protected  SourceUnit getSourceUnit()
           
 Expression transform(Expression expr)
          Transforms the given expression into another expression
 void visit(ASTNode[] nodes, SourceUnit source)
          The call made when the compiler encounters an AST Transformation Annotation
 
Methods inherited from class org.codehaus.groovy.ast.ClassCodeExpressionTransformer
visitAnnotations, visitAssertStatement, visitCaseStatement, visitConstructorOrMethod, visitDoWhileLoop, visitExpressionStatement, visitField, visitForLoop, visitIfElse, visitProperty, visitReturnStatement, visitSwitch, visitSynchronizedStatement, visitThrowStatement, visitWhileLoop
 
Methods inherited from class org.codehaus.groovy.ast.ClassCodeVisitorSupport
addError, visitBlockStatement, visitBreakStatement, visitCatchStatement, visitClass, visitClassCodeContainer, visitConstructor, visitContinueStatement, visitMethod, visitStatement, visitTryCatchFinally
 
Methods inherited from class org.codehaus.groovy.ast.CodeVisitorSupport
visitArgumentlistExpression, visitArrayExpression, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBooleanExpression, visitBytecodeExpression, visitCastExpression, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitConstructorCallExpression, visitDeclarationExpression, visitFieldExpression, visitGStringExpression, visitListExpression, visitListOfExpressions, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitRegexExpression, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitTernaryExpression, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewifyASTTransformation

public NewifyASTTransformation()
Method Detail

visit

public void visit(ASTNode[] nodes,
                  SourceUnit source)
Description copied from interface: ASTTransformation
The call made when the compiler encounters an AST Transformation Annotation

Specified by:
visit in interface ASTTransformation
Parameters:
nodes - The ASTnodes when the call was triggered
source - The source unit being compiled

transform

public Expression transform(Expression expr)
Description copied from interface: ExpressionTransformer
Transforms the given expression into another expression

Specified by:
transform in interface ExpressionTransformer
Overrides:
transform in class ClassCodeExpressionTransformer

getSourceUnit

protected SourceUnit getSourceUnit()
Specified by:
getSourceUnit in class ClassCodeVisitorSupport

Copyright © 2003-2010 The Codehaus. All rights reserved.