Top Description Fields Constructors Methods
groovy.text.markup

pack-priv Class TemplateASTTransformer

extends CompilationCustomizer
Class Inheritance
Imports
org.codehaus.groovy.ast.ClassHelper, .ClassNode, .ConstructorNode, .MethodNode, .Parameter, org.codehaus.groovy.ast.expr.ArgumentListExpression, .ConstructorCallExpression, .Expression, .VariableExpression, org.codehaus.groovy.ast.stmt.ExpressionStatement, .Statement, org.codehaus.groovy.classgen.GeneratorContext, .VariableScopeVisitor, org.codehaus.groovy.control.CompilationFailedException, .CompilePhase, .SourceUnit, org.codehaus.groovy.control.customizers.CompilationCustomizer, org.objectweb.asm.Opcodes, java.util.LinkedList, .List

An AST transformation which adapts the AST generated from a script as a class extending groovy.text.markup.BaseTemplate.

This transformation:

Field Summary

Modifier and TypeField and Description
private final TemplateConfiguration
private static final ClassNode

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
private void
createConstructor(final ClassNode classNode)

private void
transformRunMethod(final ClassNode classNode, final SourceUnit source)

Inherited from org.codehaus.groovy.control.customizers.CompilationCustomizer:
getPhase

Field Detail

configback to summary
private final TemplateConfiguration config
TEMPLATECONFIG_CLASSNODEback to summary
private static final ClassNode TEMPLATECONFIG_CLASSNODE

Constructor Detail

TemplateASTTransformerback to summary
public TemplateASTTransformer(TemplateConfiguration config)

Method Detail

callback to summary
public void call(final SourceUnit source, final GeneratorContext context, final ClassNode classNode) throws CompilationFailedException

Implements org.codehaus.groovy.control.CompilationUnit.IPrimaryClassNodeOperation.call.

Annotations
@Override
createConstructorback to summary
private void createConstructor(final ClassNode classNode)
transformRunMethodback to summary
private void transformRunMethod(final ClassNode classNode, final SourceUnit source)