Groovy Documentation

org.codehaus.groovy.control
[Java] 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

public class StaticImportVisitor
extends ClassCodeExpressionTransformer

Visitor to resolve constants and method calls from static Imports

Authors:
Jochen Theodorou
Paul King


Method Summary
protected SourceUnit getSourceUnit()

Expression transform(Expression exp)

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 node, SourceUnit source)

protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor)

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

Method Detail

getSourceUnit

protected SourceUnit getSourceUnit()


transform

public Expression transform(Expression exp)


transformBinaryExpression

protected Expression transformBinaryExpression(BinaryExpression be)


transformClosureExpression

protected Expression transformClosureExpression(ClosureExpression ce)


transformConstructorCallExpression

protected Expression transformConstructorCallExpression(ConstructorCallExpression cce)


transformMethodCallExpression

protected Expression transformMethodCallExpression(MethodCallExpression mce)


transformPropertyExpression

protected Expression transformPropertyExpression(PropertyExpression pe)


transformVariableExpression

protected Expression transformVariableExpression(VariableExpression ve)


visitAnnotations

@Override
public void visitAnnotations(AnnotatedNode node)


visitClass

public void visitClass(ClassNode node, SourceUnit source)


visitConstructorOrMethod

@Override
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor)


 

Groovy Documentation