|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.ast.CodeVisitorSupport org.codehaus.groovy.ast.ClassCodeVisitorSupport org.codehaus.groovy.ast.ClassCodeExpressionTransformer org.codehaus.groovy.transform.sc.transformers.StaticCompilationTransformer
public class StaticCompilationTransformer extends ClassCodeExpressionTransformer
Some expressions use symbols as aliases to method calls (<<, +=, ...). In static compilation, if such a method call is found, we transform the original binary expression into a method call expression so that the call gets statically compiled.
Field Summary | |
---|---|
protected static ClassNode |
BYTECODE_ADAPTER_CLASS
|
protected static Map |
BYTECODE_BINARY_ADAPTERS
|
Constructor Summary | |
StaticCompilationTransformer(SourceUnit unit)
|
Method Summary | |
---|---|
ClassNode
|
getClassNode()
|
protected SourceUnit
|
getSourceUnit()
|
StaticTypesTypeChooser
|
getTypeChooser()
|
Expression
|
transform(Expression expr)
|
void
|
visitClass(ClassNode node)
|
void
|
visitClassCodeContainer(Statement code)
|
Field Detail |
---|
protected static final ClassNode BYTECODE_ADAPTER_CLASS
protected static final Map BYTECODE_BINARY_ADAPTERS
Constructor Detail |
---|
public StaticCompilationTransformer(SourceUnit unit)
Method Detail |
---|
public ClassNode getClassNode()
@Overrideprotected SourceUnit getSourceUnit() { protected SourceUnit getSourceUnit()
public StaticTypesTypeChooser getTypeChooser()
@Overridepublic Expression transform(Expression expr) { public Expression transform(Expression expr)
@Overridepublic void visitClass(final ClassNode node) { public void visitClass(ClassNode node)
@Overridepublic void visitClassCodeContainer(final Statement code) { public void visitClassCodeContainer(Statement code)
Copyright © 2003-2013 The Codehaus. All rights reserved.