- org.codehaus.groovy.transform.ASTTransformationVisitor
-
This class handles the invocation of the ASTAnnotationTransformation
when it is encountered by a tree walk. One instance of each exists
for each phase of the compilation it applies to. Before invocation the
ASTTransformationCollectorCodeVisitor will add a list
of annotations that this visitor should be concerned about. All other
annotations are ignored, whether or not they are GroovyASTTransformation
annotated or not.
A Two-pass method is used. First all candidate annotations are added to a
list then the transformations are called on those collected annotations.
This is done to avoid concurrent modification exceptions during the AST tree
walk and allows the transformations to alter any portion of the AST tree.
Hence annotations that are added in this phase will not be processed as
transformations. They will only be handled in later phases (and then only
if the type was in the AST prior to any AST transformations being run
against it).
- Authors:
- Danno Ferrin (shemnon)
-
-
Methods Summary
-
Inherited Methods Summary
Inherited Methods
Methods inherited from class |
Name |
class ClassCodeVisitorSupport |
visitMethod, visitField, visitProperty, visitConstructor, visitReturnStatement, visitExpressionStatement, visitAssertStatement, visitTryCatchFinally, visitSwitch, visitCaseStatement, visitBreakStatement, visitContinueStatement, visitThrowStatement, visitSynchronizedStatement, visitCatchStatement, visitBlockStatement, visitForLoop, visitWhileLoop, visitDoWhileLoop, visitIfElse, visitDeclarationExpression, visitClass, visitPackage, visitAnnotations, visitImports, visitClassExpression, visitPropertyExpression, visitListExpression, visitConstantExpression, visitVariableExpression, visitArgumentlistExpression, visitMethodCallExpression, visitTupleExpression, visitStaticMethodCallExpression, visitClosureExpression, visitConstructorCallExpression, visitTernaryExpression, visitShortTernaryExpression, visitBinaryExpression, visitPrefixExpression, visitPostfixExpression, visitBooleanExpression, visitMapExpression, visitMapEntryExpression, visitRangeExpression, visitAttributeExpression, visitFieldExpression, visitMethodPointerExpression, visitGStringExpression, visitArrayExpression, visitSpreadExpression, visitSpreadMapExpression, visitNotExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitBitwiseNegationExpression, visitCastExpression, visitClosureListExpression, visitBytecodeExpression, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
class CodeVisitorSupport |
visitClassExpression, visitPropertyExpression, visitListExpression, visitConstantExpression, visitReturnStatement, visitVariableExpression, visitArgumentlistExpression, visitMethodCallExpression, visitTupleExpression, visitExpressionStatement, visitAssertStatement, visitTryCatchFinally, visitSwitch, visitCaseStatement, visitBreakStatement, visitContinueStatement, visitThrowStatement, visitSynchronizedStatement, visitCatchStatement, visitStaticMethodCallExpression, visitClosureExpression, visitBlockStatement, visitForLoop, visitWhileLoop, visitDoWhileLoop, visitIfElse, visitConstructorCallExpression, visitTernaryExpression, visitShortTernaryExpression, visitBinaryExpression, visitPrefixExpression, visitPostfixExpression, visitBooleanExpression, visitMapExpression, visitMapEntryExpression, visitRangeExpression, visitAttributeExpression, visitFieldExpression, visitMethodPointerExpression, visitDeclarationExpression, visitGStringExpression, visitArrayExpression, visitSpreadExpression, visitSpreadMapExpression, visitNotExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitBitwiseNegationExpression, visitCastExpression, visitClosureListExpression, visitBytecodeExpression, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
-
-
Method Detail
-
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.
- Parameters:
classNode
- the class to visit
- Summary:
Nested Field Constructor - Method
- | Detail:
Field Constructor - Method
Copyright © 2003-2016 The Apache Software Foundation. All rights reserved.