[Java] Class AstBuilderTransformation
- org.codehaus.groovy.ast.builder.AstBuilderTransformation
- All Implemented Interfaces and Traits:
- ASTTransformation
@GroovyASTTransformation(phase = CompilePhase.SEMANTIC_ANALYSIS) public class AstBuilderTransformation extends Object
Transformation to capture ASTBuilder from code statements.
The AstBuilder "from code" approach is used with a single Closure parameter. This transformation converts the ClosureExpression back into source code and rewrites the AST so that the "from string" builder is invoked on the source. In order for this to work, the closure source must be given a goto label. It is the "from string" approach's responsibility to remove the BlockStatement created by the label.
- Authors:
- Hamlet D'Arcy
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
void |
visit(ASTNode[] nodes, SourceUnit sourceUnit) |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Method Detail
public void visit(ASTNode[] nodes, SourceUnit sourceUnit)
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.4.21/html/gapi/org/codehaus/groovy/ast/builder/AstBuilderTransformation.html