public class AstBuilderTransformation extends MethodCallTransformation
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.
Constructor and Description |
---|
AstBuilderTransformation() |
Modifier and Type | Method and Description |
---|---|
protected GroovyCodeVisitor |
getTransformer(ASTNode[] nodes,
SourceUnit sourceUnit) |
visit
protected GroovyCodeVisitor getTransformer(ASTNode[] nodes, SourceUnit sourceUnit)
getTransformer
in class MethodCallTransformation