## org.codehaus.groovy.ast
Class ClassCodeExpressionTransformer

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

All Implemented Interfaces:
  ExpressionTransformer, GroovyClassVisitor, GroovyCodeVisitor

Direct Known Subclasses:
  NewifyASTTransformation, OptimizerVisitor, ResolveVisitor, StaticImportVisitor

    public abstract class ClassCodeExpressionTransformer

extends ClassCodeVisitorSupport
implements ExpressionTransformer

Visitor to transform expressions in a whole class. Transformed Expressions are usually not visited.

Author:
  Jochen Theodorou

Constructor Summary
`ClassCodeExpressionTransformer()`

Method Summary
`Expression` `transform(Expression exp)` Transforms the given expression into another expression
`void` `visitAnnotations(AnnotatedNode node)`
`void` `visitAssertStatement(AssertStatement as)`
`void` `visitCaseStatement(CaseStatement statement)`
`protected void` `visitConstructorOrMethod(MethodNode node, boolean isConstructor)`
`void` `visitDoWhileLoop(DoWhileStatement loop)`
`void` `visitExpressionStatement(ExpressionStatement es)`
`void` `visitField(FieldNode node)`
`void` `visitForLoop(ForStatement forLoop)`
`void` `visitIfElse(IfStatement ifElse)`
`void` `visitProperty(PropertyNode node)`
`void` `visitReturnStatement(ReturnStatement statement)`
`void` `visitSwitch(SwitchStatement statement)`
`void` `visitSynchronizedStatement(SynchronizedStatement sync)`
`void` `visitThrowStatement(ThrowStatement ts)`
`void` `visitWhileLoop(WhileStatement loop)`

Methods inherited from class org.codehaus.groovy.ast.ClassCodeVisitorSupport
`addError, getSourceUnit, visitBlockStatement, visitBreakStatement, visitCatchStatement, visitClass, visitClassCodeContainer, visitConstructor, visitContinueStatement, visitImports, visitMethod, visitPackage, visitStatement, visitTryCatchFinally, visitVariableExpression`

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

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

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ClassCodeExpressionTransformer

    public ClassCodeExpressionTransformer()

Method Detail

### visitConstructorOrMethod

    protected void visitConstructorOrMethod(MethodNode node,
                                            boolean isConstructor)

  Overrides:
    `visitConstructorOrMethod` in class `ClassCodeVisitorSupport`

### visitSwitch

    public void visitSwitch(SwitchStatement statement)

  Specified by:
    `visitSwitch` in interface `GroovyCodeVisitor`
  Overrides:
    `visitSwitch` in class `ClassCodeVisitorSupport`

### visitField

    public void visitField(FieldNode node)

  Specified by:
    `visitField` in interface `GroovyClassVisitor`
  Overrides:
    `visitField` in class `ClassCodeVisitorSupport`

### visitProperty

    public void visitProperty(PropertyNode node)

  Specified by:
    `visitProperty` in interface `GroovyClassVisitor`
  Overrides:
    `visitProperty` in class `ClassCodeVisitorSupport`

### visitIfElse

    public void visitIfElse(IfStatement ifElse)

  Specified by:
    `visitIfElse` in interface `GroovyCodeVisitor`
  Overrides:
    `visitIfElse` 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`

### visitAnnotations

    public void visitAnnotations(AnnotatedNode node)

  Overrides:
    `visitAnnotations` in class `ClassCodeVisitorSupport`

### visitReturnStatement

    public void visitReturnStatement(ReturnStatement statement)

  Specified by:
    `visitReturnStatement` in interface `GroovyCodeVisitor`
  Overrides:
    `visitReturnStatement` in class `ClassCodeVisitorSupport`

### visitAssertStatement

    public void visitAssertStatement(AssertStatement as)

  Specified by:
    `visitAssertStatement` in interface `GroovyCodeVisitor`
  Overrides:
    `visitAssertStatement` in class `ClassCodeVisitorSupport`

### visitCaseStatement

    public void visitCaseStatement(CaseStatement statement)

  Specified by:
    `visitCaseStatement` in interface `GroovyCodeVisitor`
  Overrides:
    `visitCaseStatement` in class `ClassCodeVisitorSupport`

### visitDoWhileLoop

    public void visitDoWhileLoop(DoWhileStatement loop)

  Specified by:
    `visitDoWhileLoop` in interface `GroovyCodeVisitor`
  Overrides:
    `visitDoWhileLoop` in class `ClassCodeVisitorSupport`

### visitForLoop

    public void visitForLoop(ForStatement forLoop)

  Specified by:
    `visitForLoop` in interface `GroovyCodeVisitor`
  Overrides:
    `visitForLoop` in class `ClassCodeVisitorSupport`

### visitSynchronizedStatement

    public void visitSynchronizedStatement(SynchronizedStatement sync)

  Specified by:
    `visitSynchronizedStatement` in interface `GroovyCodeVisitor`
  Overrides:
    `visitSynchronizedStatement` in class `ClassCodeVisitorSupport`

### visitThrowStatement

    public void visitThrowStatement(ThrowStatement ts)

  Specified by:
    `visitThrowStatement` in interface `GroovyCodeVisitor`
  Overrides:
    `visitThrowStatement` in class `ClassCodeVisitorSupport`

### visitWhileLoop

    public void visitWhileLoop(WhileStatement loop)

  Specified by:
    `visitWhileLoop` in interface `GroovyCodeVisitor`
  Overrides:
    `visitWhileLoop` in class `ClassCodeVisitorSupport`

### visitExpressionStatement

    public void visitExpressionStatement(ExpressionStatement es)

  Specified by:
    `visitExpressionStatement` in interface `GroovyCodeVisitor`
  Overrides:
    `visitExpressionStatement` in class `ClassCodeVisitorSupport`

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