ResolveVisitor (groovy 2.4.3 API)
Date: 2015-03-23

Package: org.codehaus.groovy.control

## [Java] Class ResolveVisitor

- org.codehaus.groovy.control.ResolveVisitor

- 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

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String[]` | `DEFAULT_IMPORTS` |

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `def` | `ResolveVisitor(CompilationUnit cu)`
    `protected SourceUnit` | `getSourceUnit()`
    `void` | `setClassNodeResolver(ClassNodeResolver classNodeResolver)`
    `void` | `startResolving(ClassNode node, SourceUnit source)`
    `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)`
    `void` | `visitAnnotations(AnnotatedNode node)`
    `void` | `visitBlockStatement(BlockStatement block)`
    `void` | `visitCatchStatement(CatchStatement cs)`
    `void` | `visitClass(ClassNode node)`
    `protected void` | `visitConstructorOrMethod(MethodNode node, boolean isConstructor)`
    `void` | `visitField(FieldNode node)`
    `void` | `visitForLoop(ForStatement forLoop)`
    `void` | `visitProperty(PropertyNode node)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class ClassCodeExpressionTransformer` | `visitField, visitProperty, visitReturnStatement, visitIfElse, visitThrowStatement, visitSynchronizedStatement, visitForLoop, visitWhileLoop, visitDoWhileLoop, visitExpressionStatement, visitAssertStatement, visitSwitch, visitCaseStatement, visitAnnotations, transform, visitMethod, visitConstructor, visitDeclarationExpression, visitClass, visitBreakStatement, visitContinueStatement, visitCatchStatement, visitBlockStatement, visitTryCatchFinally, visitPackage, visitImports, visitClassExpression, visitPropertyExpression, visitConstantExpression, visitListExpression, visitMethodPointerExpression, visitVariableExpression, visitGStringExpression, visitArrayExpression, visitSpreadExpression, visitSpreadMapExpression, visitNotExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitCastExpression, visitArgumentlistExpression, visitClosureListExpression, visitBytecodeExpression, visitMethodCallExpression, visitStaticMethodCallExpression, visitConstructorCallExpression, visitTernaryExpression, visitFieldExpression, visitShortTernaryExpression, visitBinaryExpression, visitPrefixExpression, visitPostfixExpression, visitBooleanExpression, visitClosureExpression, visitTupleExpression, visitMapExpression, visitMapEntryExpression, visitRangeExpression, visitAttributeExpression, visitBitwiseNegationExpression, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`
    `class ClassCodeVisitorSupport` | `visitMethod, visitField, visitProperty, visitConstructor, visitReturnStatement, visitDeclarationExpression, visitIfElse, visitClass, visitBreakStatement, visitContinueStatement, visitThrowStatement, visitSynchronizedStatement, visitCatchStatement, visitForLoop, visitBlockStatement, visitWhileLoop, visitDoWhileLoop, visitExpressionStatement, visitAssertStatement, visitTryCatchFinally, visitSwitch, visitCaseStatement, visitPackage, visitImports, visitAnnotations, visitClassExpression, visitPropertyExpression, visitConstantExpression, visitListExpression, visitMethodPointerExpression, visitVariableExpression, visitGStringExpression, visitArrayExpression, visitSpreadExpression, visitSpreadMapExpression, visitNotExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitCastExpression, visitArgumentlistExpression, visitClosureListExpression, visitBytecodeExpression, visitMethodCallExpression, visitStaticMethodCallExpression, visitConstructorCallExpression, visitTernaryExpression, visitFieldExpression, visitShortTernaryExpression, visitBinaryExpression, visitPrefixExpression, visitPostfixExpression, visitBooleanExpression, visitClosureExpression, visitTupleExpression, visitMapExpression, visitMapEntryExpression, visitRangeExpression, visitAttributeExpression, visitBitwiseNegationExpression, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Field Detail

    - #### public static final String[] DEFAULT_IMPORTS

  - ### Method Detail

    - #### public def ResolveVisitor(CompilationUnit cu)

    - #### protected SourceUnit getSourceUnit()

    - #### public void setClassNodeResolver(ClassNodeResolver classNodeResolver)

    - #### 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)