|
Groovy 1.7.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.ast.CodeVisitorSupport
org.codehaus.groovy.ast.ClassCodeVisitorSupport
org.codehaus.groovy.ast.ClassCodeExpressionTransformer
org.codehaus.groovy.control.ResolveVisitor
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).Nested Class Summary | |
---|---|
class |
ResolveVisitor.ConstructedClassWithPackage
we use ConstructedClassWithPackage to limit the resolving the compiler does when combining package names and class names. |
class |
ResolveVisitor.LowerCaseClass
we use LowerCaseClass to limit the resolving the compiler does for vanilla names starting with a lower case letter. |
Field Summary | |
---|---|
static String[] |
DEFAULT_IMPORTS
|
Constructor Summary | |
ResolveVisitor()
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
Field Detail |
---|
static final String[] DEFAULT_IMPORTS
Constructor Detail |
---|
ResolveVisitor()
Method Detail |
---|
public def ResolveVisitor(CompilationUnit cu)
protected SourceUnit getSourceUnit()
public void startResolving(ClassNode node, SourceUnit source)
public Expression transform(Expression exp)
protected Expression transformAnnotationConstantExpression(AnnotationConstantExpression ace)
protected Expression transformBinaryExpression(BinaryExpression be)
protected Expression transformClosureExpression(ClosureExpression ce)
protected Expression transformConstructorCallExpression(ConstructorCallExpression cce)
protected Expression transformDeclarationExpression(DeclarationExpression de)
protected Expression transformMethodCallExpression(MethodCallExpression mce)
protected Expression transformPropertyExpression(PropertyExpression pe)
protected Expression transformVariableExpression(VariableExpression ve)
public void visitAnnotations(AnnotatedNode node)
public void visitBlockStatement(BlockStatement block)
public void visitCatchStatement(CatchStatement cs)
public void visitClass(ClassNode node)
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor)
public void visitField(FieldNode node)
public void visitForLoop(ForStatement forLoop)
public void visitProperty(PropertyNode node)
Copyright © 2003-2009 The Codehaus. All rights reserved.