Package org.codehaus.groovy.control

# Class StaticImportVisitor

java.lang.Object
org.codehaus.groovy.ast.CodeVisitorSupport
org.codehaus.groovy.ast.ClassCodeVisitorSupport
org.codehaus.groovy.ast.ClassCodeExpressionTransformer
org.codehaus.groovy.control.StaticImportVisitor

All Implemented Interfaces:
  `ExpressionTransformer`, `GroovyClassVisitor`, `GroovyCodeVisitor`, `ErrorCollecting`

    public class StaticImportVisitor
    extends ClassCodeExpressionTransformer

Visitor to resolve constants and method calls from static imports.

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `StaticImportVisitor()` | Deprecated.
  `StaticImportVisitor​(ClassNode classNode, SourceUnit sourceUnit)` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `protected SourceUnit` | `getSourceUnit()` |
  `Expression` | `transform​(Expression exp)` | Transforms the given expression into another expression
  `protected Expression` | `transformBinaryExpression​(BinaryExpression be)` |
  `protected Expression` | `transformClosureExpression​(ClosureExpression ce)` |
  `protected Expression` | `transformConstructorCallExpression​(ConstructorCallExpression cce)` |
  `protected Expression` | `transformMethodCallExpression​(MethodCallExpression mce)` |
  `protected Expression` | `transformPropertyExpression​(PropertyExpression pe)` |
  `protected Expression` | `transformVariableExpression​(VariableExpression ve)` |
  `void` | `visitAnnotations​(AnnotatedNode node)` |
  `void` | `visitClass​(ClassNode classNode, SourceUnit sourceUnit)` | Deprecated.
  `protected void` | `visitConstructorOrMethod​(MethodNode node, boolean isConstructor)` |

  ### Methods inherited from class org.codehaus.groovy.ast.ClassCodeExpressionTransformer

  `setSourcePosition, visitAnnotation, visitAssertStatement, visitCaseStatement, visitDoWhileLoop, visitExpressionStatement, visitField, visitForLoop, visitIfElse, visitProperty, visitReturnStatement, visitSwitch, visitSynchronizedStatement, visitThrowStatement, visitWhileLoop`

  ### Methods inherited from class org.codehaus.groovy.ast.ClassCodeVisitorSupport

  `addError, visitBlockStatement, visitBreakStatement, visitCatchStatement, visitClass, visitClassCodeContainer, visitConstructor, visitContinueStatement, visitDeclarationExpression, visitImports, visitMethod, visitObjectInitializerStatements, visitPackage, visitStatement, visitTryCatchFinally`

  ### Methods inherited from class org.codehaus.groovy.ast.CodeVisitorSupport

  `afterSwitchConditionExpressionVisited, visitArgumentlistExpression, visitArrayExpression, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBooleanExpression, visitBytecodeExpression, visitCastExpression, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitConstructorCallExpression, visitEmptyStatement, visitFieldExpression, visitGStringExpression, visitLambdaExpression, visitListExpression, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitMethodReferenceExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitTernaryExpression, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface org.codehaus.groovy.ast.GroovyCodeVisitor

  `visitEmptyExpression, visitListOfExpressions`

- ## Constructor Details

  - ### StaticImportVisitor

    @Deprecated public StaticImportVisitor()
    Deprecated.
    Use `StaticImportVisitor(ClassNode,SourceUnit)`.

  - ### StaticImportVisitor

    public StaticImportVisitor​(ClassNode classNode, SourceUnit sourceUnit)

- ## Method Details

  - ### visitClass

    @Deprecated public void visitClass​(ClassNode classNode, SourceUnit sourceUnit)
    Deprecated.
    Call `StaticImportVisitor(ClassNode,SourceUnit)` then `ClassCodeVisitorSupport.visitClass(ClassNode)`.

  - ### visitConstructorOrMethod

    protected void visitConstructorOrMethod​(MethodNode node, boolean isConstructor)
    Overrides:
      `visitConstructorOrMethod` in class `ClassCodeExpressionTransformer`

  - ### visitAnnotations

    public void visitAnnotations​(AnnotatedNode node)
    Overrides:
      `visitAnnotations` in class `ClassCodeVisitorSupport`

  - ### transform

    public Expression transform​(Expression exp)
    Description copied from interface: `ExpressionTransformer`
    Transforms the given expression into another expression
    Specified by:
      `transform` in interface `ExpressionTransformer`
    Overrides:
      `transform` in class `ClassCodeExpressionTransformer`

  - ### transformBinaryExpression

    protected Expression transformBinaryExpression​(BinaryExpression be)

  - ### transformVariableExpression

    protected Expression transformVariableExpression​(VariableExpression ve)

  - ### transformMethodCallExpression

    protected Expression transformMethodCallExpression​(MethodCallExpression mce)

  - ### transformConstructorCallExpression

    protected Expression transformConstructorCallExpression​(ConstructorCallExpression cce)

  - ### transformClosureExpression

    protected Expression transformClosureExpression​(ClosureExpression ce)

  - ### transformPropertyExpression

    protected Expression transformPropertyExpression​(PropertyExpression pe)

  - ### getSourceUnit

    protected SourceUnit getSourceUnit()
    Specified by:
      `getSourceUnit` in class `ClassCodeVisitorSupport`