- org.codehaus.groovy.transform.sc.StaticCompilationVisitor
-
public class StaticCompilationVisitor
extends StaticTypeCheckingVisitor
This visitor is responsible for amending the AST with static compilation metadata or transform the AST so that
a class or a method can be statically compiled. It may also throw errors specific to static compilation which
are not considered as an error at the type check pass. For example, usage of spread operator is not allowed
in statically compiled portions of code, while it may be statically checked.
Static compilation relies on static type checking, which explains why this visitor extends the type checker
visitor.
-
-
Methods Summary
-
Inherited Methods Summary
Inherited Methods
Methods inherited from class |
Name |
class StaticTypeCheckingVisitor |
addError, addTypeCheckingExtension, extractPropertyNameFromMethodName, getTypeCheckingContext, inferLoopElementType, initialize, isSkipMode, performSecondPass, setCompilationUnit, setMethodsToBeVisited, visitArrayExpression, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBlockStatement, visitCaseStatement, visitCastExpression, visitClass, visitClassExpression, visitClosingBlock, visitClosureExpression, visitClosureExpression, visitConstructor, visitConstructorCallExpression, visitExpressionStatement, visitField, visitForLoop, visitIfElse, visitMethod, visitMethodCallExpression, visitMethodCallExpression, visitMethodPointerExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitProperty, visitPropertyExpression, visitRangeExpression, visitReturnStatement, visitReturnStatement, visitStaticMethodCallExpression, visitSwitch, visitTernaryExpression, visitTryCatchFinally, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression, visitWhileLoop |
class ClassCodeVisitorSupport |
addError, visitAnnotations, visitAssertStatement, visitBlockStatement, visitBreakStatement, visitCaseStatement, visitCatchStatement, visitClass, visitConstructor, visitContinueStatement, visitDeclarationExpression, visitDoWhileLoop, visitExpressionStatement, visitField, visitForLoop, visitIfElse, visitImports, visitMethod, visitPackage, visitProperty, visitReturnStatement, visitSwitch, visitSynchronizedStatement, visitThrowStatement, visitTryCatchFinally, visitWhileLoop |
class CodeVisitorSupport |
visitArgumentlistExpression, visitArrayExpression, visitAssertStatement, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBlockStatement, visitBooleanExpression, visitBreakStatement, visitBytecodeExpression, visitCaseStatement, visitCastExpression, visitCatchStatement, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitConstructorCallExpression, visitContinueStatement, visitDeclarationExpression, visitDoWhileLoop, visitEmptyStatement, visitExpressionStatement, visitFieldExpression, visitForLoop, visitGStringExpression, visitIfElse, visitLambdaExpression, visitListExpression, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitMethodReferenceExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitReturnStatement, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitSwitch, visitSynchronizedStatement, visitTernaryExpression, visitThrowStatement, visitTryCatchFinally, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression, visitWhileLoop |
-
-
Field Detail
-
public static final MethodNode ARRAYLIST_ADD_METHOD
-
public static final ClassNode ARRAYLIST_CLASSNODE
-
public static final MethodNode ARRAYLIST_CONSTRUCTOR
-
public static final ClassNode COMPILESTATIC_CLASSNODE
-
public static final ClassNode TYPECHECKED_CLASSNODE
Copyright © 2003-2022 The Apache Software Foundation. All rights reserved.