org.codehaus.groovy.control
[Java] Class ResolveVisitor
java.lang.Object
org.codehaus.groovy.ast.CodeVisitorSupport
org.codehaus.groovy.ast.ClassCodeVisitorSupport
org.codehaus.groovy.ast.ClassCodeExpressionTransformer
org.codehaus.groovy.control.ResolveVisitor
public class ResolveVisitor
extends ClassCodeExpressionTransformer
Visitor to resolve Types and convert VariableExpression to
ClassExpressions if needed. The ResolveVisitor will try to
find the Class for a ClassExpression and prints an error if
it fails to do so. Constructions like C[], foo as C, (C) foo
will force creation of a ClassExpression for C
Note: the method to start the resolving is startResolving(ClassNode, SourceUnit).
- Authors:
- Jochen Theodorou
- Roshan Dawrani
- Alex Tkachman
Methods inherited from class ClassCodeExpressionTransformer
|
visitField, visitReturnStatement, visitProperty, visitForLoop, visitSwitch, visitWhileLoop, visitDoWhileLoop, visitExpressionStatement, visitAnnotations, visitIfElse, visitAssertStatement, visitCaseStatement, visitSynchronizedStatement, visitThrowStatement, transform, visitMethod, visitConstructor, visitBlockStatement, visitPackage, visitClass, visitCatchStatement, visitImports, visitDeclarationExpression, visitBreakStatement, visitContinueStatement, visitTryCatchFinally, visitClassExpression, visitConstantExpression, visitListExpression, visitPropertyExpression, visitMethodCallExpression, visitStaticMethodCallExpression, visitConstructorCallExpression, visitBinaryExpression, visitTernaryExpression, visitShortTernaryExpression, visitPostfixExpression, visitPrefixExpression, visitBooleanExpression, visitNotExpression, visitClosureExpression, visitTupleExpression, visitArrayExpression, visitMapExpression, visitMapEntryExpression, visitRangeExpression, visitSpreadExpression, visitSpreadMapExpression, visitMethodPointerExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitBitwiseNegationExpression, visitCastExpression, visitVariableExpression, visitAttributeExpression, visitFieldExpression, visitGStringExpression, visitArgumentlistExpression, visitClosureListExpression, visitBytecodeExpression, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Methods inherited from class ClassCodeVisitorSupport
|
visitMethod, visitField, visitReturnStatement, visitProperty, visitConstructor, visitForLoop, visitSwitch, visitWhileLoop, visitDoWhileLoop, visitExpressionStatement, visitBlockStatement, visitPackage, visitClass, visitAnnotations, visitCatchStatement, visitIfElse, visitAssertStatement, visitCaseStatement, visitSynchronizedStatement, visitThrowStatement, visitImports, visitDeclarationExpression, visitBreakStatement, visitContinueStatement, visitTryCatchFinally, visitClassExpression, visitConstantExpression, visitListExpression, visitPropertyExpression, visitMethodCallExpression, visitStaticMethodCallExpression, visitConstructorCallExpression, visitBinaryExpression, visitTernaryExpression, visitShortTernaryExpression, visitPostfixExpression, visitPrefixExpression, visitBooleanExpression, visitNotExpression, visitClosureExpression, visitTupleExpression, visitArrayExpression, visitMapExpression, visitMapEntryExpression, visitRangeExpression, visitSpreadExpression, visitSpreadMapExpression, visitMethodPointerExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitBitwiseNegationExpression, visitCastExpression, visitVariableExpression, visitAttributeExpression, visitFieldExpression, visitGStringExpression, visitArgumentlistExpression, visitClosureListExpression, visitBytecodeExpression, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
DEFAULT_IMPORTS
public static final String[] DEFAULT_IMPORTS
-
ResolveVisitor
public def ResolveVisitor(CompilationUnit cu)
-
getSourceUnit
protected SourceUnit getSourceUnit()
-
setClassNodeResolver
public void setClassNodeResolver(ClassNodeResolver classNodeResolver)
-
startResolving
public void startResolving(ClassNode node, SourceUnit source)
-
transform
public Expression transform(Expression exp)
-
transformAnnotationConstantExpression
protected Expression transformAnnotationConstantExpression(AnnotationConstantExpression ace)
-
transformBinaryExpression
protected Expression transformBinaryExpression(BinaryExpression be)
-
transformClosureExpression
protected Expression transformClosureExpression(ClosureExpression ce)
-
transformConstructorCallExpression
protected Expression transformConstructorCallExpression(ConstructorCallExpression cce)
-
transformDeclarationExpression
protected Expression transformDeclarationExpression(DeclarationExpression de)
-
transformMethodCallExpression
protected Expression transformMethodCallExpression(MethodCallExpression mce)
-
transformPropertyExpression
protected Expression transformPropertyExpression(PropertyExpression pe)
-
transformVariableExpression
protected Expression transformVariableExpression(VariableExpression ve)
-
visitAnnotations
public void visitAnnotations(AnnotatedNode node)
-
visitBlockStatement
public void visitBlockStatement(BlockStatement block)
-
visitCatchStatement
public void visitCatchStatement(CatchStatement cs)
-
visitClass
public void visitClass(ClassNode node)
-
visitConstructorOrMethod
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor)
-
visitField
public void visitField(FieldNode node)
-
visitForLoop
public void visitForLoop(ForStatement forLoop)
-
visitProperty
public void visitProperty(PropertyNode node)
-
Copyright © 2003-2013 The Codehaus. All rights reserved.