public class StaticCompilationTransformer extends ClassCodeExpressionTransformer
Modifier and Type | Field and Description |
---|---|
protected static ClassNode |
BYTECODE_ADAPTER_CLASS |
protected static Map<Integer,MethodNode> |
BYTECODE_BINARY_ADAPTERS |
Constructor and Description |
---|
StaticCompilationTransformer(SourceUnit unit,
StaticTypeCheckingVisitor visitor) |
Modifier and Type | Method and Description |
---|---|
ClassNode |
getClassNode() |
protected SourceUnit |
getSourceUnit() |
StaticTypesTypeChooser |
getTypeChooser() |
Expression |
transform(Expression expr)
Transforms the given expression into another expression
|
void |
visitClass(ClassNode node)
Visit a ClassNode.
|
void |
visitClassCodeContainer(Statement code) |
protected void |
visitConstructorOrMethod(MethodNode node,
boolean isConstructor) |
visitAnnotations, visitAssertStatement, visitCaseStatement, visitDoWhileLoop, visitExpressionStatement, visitField, visitForLoop, visitIfElse, visitProperty, visitReturnStatement, visitSwitch, visitSynchronizedStatement, visitThrowStatement, visitWhileLoop
addError, visitBlockStatement, visitBreakStatement, visitCatchStatement, visitConstructor, visitContinueStatement, visitDeclarationExpression, visitImports, visitMethod, visitObjectInitializerStatements, visitPackage, visitStatement, visitTryCatchFinally
visitArgumentlistExpression, visitArrayExpression, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBooleanExpression, visitBytecodeExpression, visitCastExpression, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitConstructorCallExpression, visitEmptyStatement, visitFieldExpression, visitGStringExpression, visitListExpression, visitListOfExpressions, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitTernaryExpression, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression
protected static final ClassNode BYTECODE_ADAPTER_CLASS
protected static final Map<Integer,MethodNode> BYTECODE_BINARY_ADAPTERS
public StaticCompilationTransformer(SourceUnit unit, StaticTypeCheckingVisitor visitor)
protected SourceUnit getSourceUnit()
getSourceUnit
in class ClassCodeVisitorSupport
public StaticTypesTypeChooser getTypeChooser()
public ClassNode getClassNode()
public void visitClassCodeContainer(Statement code)
visitClassCodeContainer
in class ClassCodeVisitorSupport
public Expression transform(Expression expr)
ExpressionTransformer
transform
in interface ExpressionTransformer
transform
in class ClassCodeExpressionTransformer
public void visitClass(ClassNode node)
GroovyClassVisitor
visitClass
in interface GroovyClassVisitor
visitClass
in class ClassCodeVisitorSupport
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor)
visitConstructorOrMethod
in class ClassCodeExpressionTransformer