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).
Modifiers | Name | Description |
---|---|---|
static String[] |
DEFAULT_IMPORTS |
|
static String[] |
EMPTY_STRING_ARRAY |
|
static String |
QUESTION_MARK |
Constructor and description |
---|
ResolveVisitor(CompilationUnit compilationUnit) |
Type Params | Return Type | Name and description |
---|---|---|
|
public void |
setClassNodeResolver(ClassNodeResolver classNodeResolver) |
|
public void |
startResolving(ClassNode node, SourceUnit source) |
|
public Expression |
transform(Expression exp) |
|
public void |
visitBlockStatement(BlockStatement block) |
|
public void |
visitCatchStatement(CatchStatement cs) |
|
public void |
visitClass(ClassNode node) |
|
public void |
visitField(FieldNode node) |
|
public void |
visitForLoop(ForStatement forLoop) |
|
public void |
visitMethod(MethodNode node) |
|
public void |
visitProperty(PropertyNode node) |
Copyright © 2003-2022 The Apache Software Foundation. All rights reserved.