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

    public class StaticImportVisitor

extends ClassCodeExpressionTransformer

Visitor to resolve constants and method calls from static Imports

Author:
  Jochen Theodorou, Paul King

Constructor Summary
`StaticImportVisitor(CompilationUnit cu)`

Method Summary
`protected SourceUnit` `getSourceUnit()`
`Expression` `transform(Expression exp)` Transforms the given expression into another expression
`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` `visitClass(ClassNode node, SourceUnit source)`
`protected void` `visitConstructorOrMethod(MethodNode node, boolean isConstructor)`

Methods inherited from class org.codehaus.groovy.ast.ClassCodeExpressionTransformer
`visitAnnotations, 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, visitMethod, visitStatement, visitTryCatchFinally`

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

`visitArgumentlistExpression, visitArrayExpression, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBooleanExpression, visitCastExpression, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitConstructorCallExpression, visitDeclarationExpression, visitFieldExpression, visitGStringExpression, visitListExpression, visitListOfExpressions, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitRegexExpression, 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`

Constructor Detail

### StaticImportVisitor

    public StaticImportVisitor(CompilationUnit cu)

Method Detail

### visitClass

    public void visitClass(ClassNode node,
                           SourceUnit source)

### visitConstructorOrMethod

    protected void visitConstructorOrMethod(MethodNode node,
                                            boolean isConstructor)

  Overrides:
    `visitConstructorOrMethod` in class `ClassCodeExpressionTransformer`

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

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

Copyright © 2003-2008 The Codehaus. All rights reserved.