Package: org.codehaus.groovy.tools.javac

## [Java] Class JavaAwareResolveVisitor

- org.codehaus.groovy.tools.javac.JavaAwareResolveVisitor

-     public class JavaAwareResolveVisitor
      extends ResolveVisitor

  Resolve visitor variant used during joint compilation to revisit special constructor calls and track missing imports for Java sources.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class ResolveVisitor` | `DEFAULT_IMPORTS, EMPTY_STRING_ARRAY, QUESTION_MARK`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `JavaAwareResolveVisitor(CompilationUnit cu)` Creates a resolve visitor for the supplied compilation unit.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `addError(String error, ASTNode node)` Marks the source unit when a type resolution error indicates imports may need to be reconsidered.
    `` | `protected void` | `visitClassCodeContainer(Statement stmt)` Suppresses class-code-container traversal so normal resolution logic can handle the statements.
    `` | `public void` | `visitConstructor(ConstructorNode node)` Resolves a constructor and then revisits any leading special constructor call expression.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class ResolveVisitor` | `getSourceUnit, resolve, resolve, resolveFromCompileUnit, resolveFromDefaultImports, resolveFromDefaultImports, resolveFromModule, resolveFromStaticInnerClasses, resolveNestedClass, resolveToInner, resolveToOuter, setClassNodeResolver, startResolving, transform, transformAnnotationConstantExpression, transformBinaryExpression, transformClosureExpression, transformConstructorCallExpression, transformDeclarationExpression, transformMethodCallExpression, transformPropertyExpression, transformVariableExpression, visitAnnotation, visitBlockStatement, visitCatchStatement, visitClass, visitConstructorOrMethod, visitField, visitForLoop, visitProperty, visitStatementAnnotations`
    `class ClassCodeExpressionTransformer` | `setSourcePosition, transform, visitAnnotation, visitAssertStatement, visitCaseStatement, visitClosureExpression, visitConstructorOrMethod, visitDoWhileLoop, visitExpressionStatement, visitField, visitForLoop, visitIfElse, visitProperty, visitReturnStatement, visitSwitch, visitSynchronizedStatement, visitThrowStatement, visitWhileLoop`
    `class ClassCodeVisitorSupport` | `addError, getSourceUnit, visitAnnotation, visitAnnotations, visitAnnotations, visitAssertStatement, visitBlockStatement, visitBreakStatement, visitCaseStatement, visitCatchStatement, visitClass, visitClassCodeContainer, visitClosureExpression, visitConstructor, visitConstructorOrMethod, visitContinueStatement, visitDeclarationExpression, visitDoWhileLoop, visitExpressionStatement, visitField, visitForLoop, visitIfElse, visitImports, visitMethod, visitObjectInitializerStatements, visitPackage, visitProperty, visitReturnStatement, visitStatement, visitStatementAnnotations, visitSwitch, visitSynchronizedStatement, visitThrowStatement, visitTryCatchFinally, visitWhileLoop`
    `class CodeVisitorSupport` | `afterSwitchCaseStatementsVisited, afterSwitchConditionExpressionVisited, visitArgumentlistExpression, visitArrayExpression, visitAssertStatement, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBlockStatement, visitBooleanExpression, visitBreakStatement, visitBytecodeExpression, visitCaseStatement, visitCastExpression, visitCatchStatement, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitConstructorCallExpression, visitContinueStatement, visitDeclarationExpression, visitDoWhileLoop, visitEmptyStatement, visitExpressionStatement, visitFieldExpression, visitForLoop, visitGStringExpression, visitIfElse, visitLambdaExpression, visitListExpression, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitMethodReferenceExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitReturnStatement, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitSwitch, visitSynchronizedStatement, visitTernaryExpression, visitThrowStatement, visitTryCatchFinally, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression, visitWhileLoop`

- - ### Constructor Detail

    - #### public JavaAwareResolveVisitor(CompilationUnit cu)

      Creates a resolve visitor for the supplied compilation unit.

      Parameters:
        `cu` - the compilation unit being resolved

  - ### Method Detail

    - #### public void addError(String error, ASTNode node)

      Marks the source unit when a type resolution error indicates imports may need to be reconsidered.

      Parameters:
        `error` - the error message
        `node` - the node that triggered the error

    - #### protected void visitClassCodeContainer(Statement stmt)

      Suppresses class-code-container traversal so normal resolution logic can handle the statements.

      Parameters:
        `stmt` - the statement container being considered

    - #### public void visitConstructor(ConstructorNode node)

      Resolves a constructor and then revisits any leading special constructor call expression.

      Parameters:
        `node` - the constructor being visited