public class ResolveVisitor extends ClassCodeExpressionTransformer
Note: the method to start the resolving is startResolving(ClassNode, SourceUnit).
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
DEFAULT_IMPORTS |
Constructor and Description |
---|
ResolveVisitor(CompilationUnit cu) |
visitAssertStatement, visitCaseStatement, visitDoWhileLoop, visitExpressionStatement, visitIfElse, visitReturnStatement, visitSwitch, visitSynchronizedStatement, visitThrowStatement, visitWhileLoop
addError, visitBreakStatement, visitClassCodeContainer, 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
public ResolveVisitor(CompilationUnit cu)
public void startResolving(ClassNode node, SourceUnit source)
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor)
visitConstructorOrMethod
in class ClassCodeExpressionTransformer
public void visitField(FieldNode node)
GroovyClassVisitor
visitField
in interface GroovyClassVisitor
visitField
in class ClassCodeExpressionTransformer
public void visitProperty(PropertyNode node)
GroovyClassVisitor
visitProperty
in interface GroovyClassVisitor
visitProperty
in class ClassCodeExpressionTransformer
public Expression transform(Expression exp)
ExpressionTransformer
transform
in interface ExpressionTransformer
transform
in class ClassCodeExpressionTransformer
protected Expression transformPropertyExpression(PropertyExpression pe)
protected Expression transformVariableExpression(VariableExpression ve)
protected Expression transformBinaryExpression(BinaryExpression be)
protected Expression transformClosureExpression(ClosureExpression ce)
protected Expression transformConstructorCallExpression(ConstructorCallExpression cce)
protected Expression transformMethodCallExpression(MethodCallExpression mce)
protected Expression transformDeclarationExpression(DeclarationExpression de)
protected Expression transformAnnotationConstantExpression(AnnotationConstantExpression ace)
public void visitAnnotations(AnnotatedNode node)
visitAnnotations
in class ClassCodeExpressionTransformer
public void visitClass(ClassNode node)
GroovyClassVisitor
visitClass
in interface GroovyClassVisitor
visitClass
in class ClassCodeVisitorSupport
public void visitCatchStatement(CatchStatement cs)
visitCatchStatement
in interface GroovyCodeVisitor
visitCatchStatement
in class ClassCodeVisitorSupport
public void visitForLoop(ForStatement forLoop)
visitForLoop
in interface GroovyCodeVisitor
visitForLoop
in class ClassCodeExpressionTransformer
public void visitBlockStatement(BlockStatement block)
visitBlockStatement
in interface GroovyCodeVisitor
visitBlockStatement
in class ClassCodeVisitorSupport
protected SourceUnit getSourceUnit()
getSourceUnit
in class ClassCodeVisitorSupport
public void setClassNodeResolver(ClassNodeResolver classNodeResolver)