Class MacroTransformation
java.lang.Object
org.codehaus.groovy.ast.MethodCallTransformation
org.codehaus.groovy.macro.transform.MacroTransformation
- All Implemented Interfaces:
CompilationUnitAware,ASTTransformation
- Since:
- 2.5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CompilationUnitCompilation unit that owns the current transformation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected GroovyCodeVisitorgetTransformer(ASTNode[] nodes, SourceUnit sourceUnit) Creates the visitor that rewrites macro method calls.voidStores the current compilation unit for later macro expansion.Methods inherited from class org.codehaus.groovy.ast.MethodCallTransformation
visit
-
Field Details
-
unit
Compilation unit that owns the current transformation.
-
-
Constructor Details
-
MacroTransformation
public MacroTransformation()
-
-
Method Details
-
setCompilationUnit
Stores the current compilation unit for later macro expansion.- Specified by:
setCompilationUnitin interfaceCompilationUnitAware- Parameters:
unit- the current compilation unit
-
getTransformer
Creates the visitor that rewrites macro method calls.- Specified by:
getTransformerin classMethodCallTransformation- Parameters:
nodes- the visited nodessourceUnit- the current source unit- Returns:
- the macro-transforming visitor
-