Package org.codehaus.groovy.ast

# Class TransformingCodeVisitor

java.lang.Object
org.codehaus.groovy.ast.CodeVisitorSupport
org.codehaus.groovy.ast.TransformingCodeVisitor

All Implemented Interfaces:
  `GroovyCodeVisitor`

public class TransformingCodeVisitor extends CodeVisitorSupport
Code visitor that combines depth-first traversal with expression transformation, delegating both to an underlying `ClassCodeExpressionTransformer`.

This visitor implements a two-phase approach for each statement and expression:

1. Depth-first traversal via the parent `CodeVisitorSupport` class visits child nodes
2. Expression transformation via the `ClassCodeExpressionTransformer` processes the node

This pattern enables both traversal and transformation in a single pass. The transformer receives fully-traversed nodes, allowing it to operate on complete subtrees or apply post-processing transformations after children are visited.

Typical usage involves creating a subclass of `ClassCodeExpressionTransformer` and passing it to this visitor:

       ClassCodeExpressionTransformer transformer = new MyTransformer(...);
       TransformingCodeVisitor visitor = new TransformingCodeVisitor(transformer);
       node.visit(visitor);

See Also:
  - `for base traversal implementation`
  - `for transformation implementation`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TransformingCodeVisitor(ClassCodeExpressionTransformer trn)`
  Creates a new transforming visitor with the given transformer.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `visitArgumentlistExpression(ArgumentListExpression ale)`
  Visits an `ArgumentListExpression`, treating it as a tuple expression.
  `void`
  `visitArrayExpression(ArrayExpression expression)`
  Visits an `ArrayExpression`, traversing element expressions and size expressions.
  `void`
  `visitAssertStatement(AssertStatement statement)`
  Visits an `AssertStatement`, traversing the assertion condition and optional message expression.
  `void`
  `visitAttributeExpression(AttributeExpression expression)`
  Visits an `AttributeExpression`, traversing the object and attribute name expressions.
  `void`
  `visitBinaryExpression(BinaryExpression expression)`
  Visits a `BinaryExpression`, traversing left and right operand expressions.
  `void`
  `visitBitwiseNegationExpression(BitwiseNegationExpression expression)`
  Visits a `BitwiseNegationExpression`, traversing the operand expression.
  `void`
  `visitBlockStatement(BlockStatement block)`
  Visits a `BlockStatement`, performing depth-first traversal followed by transformer processing.
  `void`
  `visitBooleanExpression(BooleanExpression expression)`
  Visits a `BooleanExpression`, traversing the contained expression.
  `void`
  `visitBreakStatement(BreakStatement statement)`
  Visits a `BreakStatement`.
  `void`
  `visitBytecodeExpression(BytecodeExpression cle)`
  Visits a `BytecodeExpression`.
  `void`
  `visitCaseStatement(CaseStatement statement)`
  Visits a `CaseStatement`, traversing the case expression and code block.
  `void`
  `visitCastExpression(CastExpression expression)`
  Visits a `CastExpression`, traversing the operand expression.
  `void`
  `visitCatchStatement(CatchStatement statement)`
  Visits a `CatchStatement`, traversing the catch block code.
  `void`
  `visitClassExpression(ClassExpression expression)`
  Visits a `ClassExpression`.
  `void`
  `visitClosureExpression(ClosureExpression expression)`
  Visits a `ClosureExpression`, traversing parameter initializers and the closure code block.
  `void`
  `visitClosureListExpression(ClosureListExpression cle)`
  Visits a `ClosureListExpression`, traversing all contained expressions.
  `void`
  `visitConstantExpression(ConstantExpression expression)`
  Visits a `ConstantExpression`.
  `void`
  `visitContinueStatement(ContinueStatement statement)`
  Visits a `ContinueStatement`.
  `void`
  `visitDeclarationExpression(DeclarationExpression expression)`
  Visits a `DeclarationExpression`, treating it as a binary expression.
  `void`
  `visitDoWhileLoop(DoWhileStatement loop)`
  Visits a `DoWhileStatement`, traversing the loop body before the boolean condition.
  `void`
  `visitExpressionStatement(ExpressionStatement statement)`
  Visits an `ExpressionStatement`, traversing its contained expression.
  `void`
  `visitFieldExpression(FieldExpression expression)`
  Visits a `FieldExpression`.
  `void`
  `visitForLoop(ForStatement forLoop)`
  Visits a `ForStatement`, traversing the collection expression and loop body.
  `void`
  `visitGStringExpression(GStringExpression expression)`
  Visits a `GStringExpression`, traversing string parts and interpolated value expressions.
  `void`
  `visitIfElse(IfStatement ifElse)`
  Visits an `IfStatement`, traversing the condition, if-block, and optional else-block.
  `void`
  `visitListExpression(ListExpression expression)`
  Visits a `ListExpression`, traversing all contained expressions.
  `void`
  `visitMapEntryExpression(MapEntryExpression expression)`
  Visits a `MapEntryExpression`, traversing key and value expressions.
  `void`
  `visitMapExpression(MapExpression expression)`
  Visits a `MapExpression`, traversing all map entry expressions.
  `void`
  `visitMethodPointerExpression(MethodPointerExpression expression)`
  Visits a `MethodPointerExpression`, traversing the object and method name expressions.
  `void`
  `visitNotExpression(NotExpression expression)`
  Visits a `NotExpression`, traversing the operand expression.
  `void`
  `visitPostfixExpression(PostfixExpression expression)`
  Visits a `PostfixExpression`, traversing the operand expression.
  `void`
  `visitPrefixExpression(PrefixExpression expression)`
  Visits a `PrefixExpression`, traversing the operand expression.
  `void`
  `visitPropertyExpression(PropertyExpression expression)`
  Visits a `PropertyExpression`, traversing the object and property name expressions.
  `void`
  `visitRangeExpression(RangeExpression expression)`
  Visits a `RangeExpression`, traversing from and to boundary expressions.
  `void`
  `visitReturnStatement(ReturnStatement statement)`
  Visits a `ReturnStatement`, traversing its return expression.
  `void`
  `visitShortTernaryExpression(ElvisOperatorExpression expression)`
  Visits a `ElvisOperatorExpression`, treating it as a ternary expression.
  `void`
  `visitSpreadExpression(SpreadExpression expression)`
  Visits a `SpreadExpression`, traversing the operand expression.
  `void`
  `visitSpreadMapExpression(SpreadMapExpression expression)`
  Visits a `SpreadMapExpression`, traversing the operand expression.
  `void`
  `visitStaticMethodCallExpression(StaticMethodCallExpression call)`
  Visits a `StaticMethodCallExpression`, traversing its argument list.
  `void`
  `visitSwitch(SwitchStatement statement)`
  Visits a `SwitchStatement`, traversing the switch expression, case statements, and default statement.
  `void`
  `visitSynchronizedStatement(SynchronizedStatement statement)`
  Visits a `SynchronizedStatement`, traversing the synchronization expression and code block.
  `void`
  `visitTernaryExpression(TernaryExpression expression)`
  Visits a `TernaryExpression`, traversing the condition, true-branch, and false-branch expressions.
  `void`
  `visitThrowStatement(ThrowStatement statement)`
  Visits a `ThrowStatement`, traversing the exception expression.
  `void`
  `visitTryCatchFinally(TryCatchStatement statement)`
  Visits a `TryCatchStatement`, traversing resource statements, try block, catch statements, and finally block.
  `void`
  `visitTupleExpression(TupleExpression expression)`
  Visits a `TupleExpression`, traversing all contained expressions.
  `void`
  `visitUnaryMinusExpression(UnaryMinusExpression expression)`
  Visits a `UnaryMinusExpression`, traversing the operand expression.
  `void`
  `visitUnaryPlusExpression(UnaryPlusExpression expression)`
  Visits a `UnaryPlusExpression`, traversing the operand expression.
  `void`
  `visitVariableExpression(VariableExpression expression)`
  Visits a `VariableExpression`.
  `void`
  `visitWhileLoop(WhileStatement loop)`
  Visits a `WhileStatement`, traversing the boolean condition and loop body.

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

  `afterSwitchCaseStatementsVisited, afterSwitchConditionExpressionVisited, visitConstructorCallExpression, visitEmptyStatement, visitLambdaExpression, visitMethodCallExpression, visitMethodReferenceExpression`

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

  `visit, visit, visitEmptyExpression, visitListOfExpressions`

- ## Constructor Details

  - ### TransformingCodeVisitor

    public TransformingCodeVisitor(ClassCodeExpressionTransformer trn)
    Creates a new transforming visitor with the given transformer.
    Parameters:
      `trn` - the `ClassCodeExpressionTransformer` to apply after traversing each node; must not be null

- ## Method Details

  - ### visitBlockStatement

    public void visitBlockStatement(BlockStatement block)
    Visits a `BlockStatement`, performing depth-first traversal followed by transformer processing.
    Specified by:
      `visitBlockStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitBlockStatement` in class `CodeVisitorSupport`
    Parameters:
      `block` - the block statement to visit and transform
    See Also:
      - `CodeVisitorSupport.visitForLoop(ForStatement)`
      - `CodeVisitorSupport.visitWhileLoop(WhileStatement)`

  - ### visitForLoop

    public void visitForLoop(ForStatement forLoop)
    Description copied from class: `CodeVisitorSupport`
    Visits a `ForStatement`, traversing the collection expression and loop body.
    Specified by:
      `visitForLoop` in interface `GroovyCodeVisitor`
    Overrides:
      `visitForLoop` in class `CodeVisitorSupport`
    Parameters:
      `forLoop` - the for loop statement

  - ### visitWhileLoop

    public void visitWhileLoop(WhileStatement loop)
    Description copied from class: `CodeVisitorSupport`
    Visits a `WhileStatement`, traversing the boolean condition and loop body.
    Specified by:
      `visitWhileLoop` in interface `GroovyCodeVisitor`
    Overrides:
      `visitWhileLoop` in class `CodeVisitorSupport`
    Parameters:
      `loop` - the while loop statement

  - ### visitDoWhileLoop

    public void visitDoWhileLoop(DoWhileStatement loop)
    Description copied from class: `CodeVisitorSupport`
    Visits a `DoWhileStatement`, traversing the loop body before the boolean condition.
    Specified by:
      `visitDoWhileLoop` in interface `GroovyCodeVisitor`
    Overrides:
      `visitDoWhileLoop` in class `CodeVisitorSupport`
    Parameters:
      `loop` - the do-while loop statement

  - ### visitIfElse

    public void visitIfElse(IfStatement ifElse)
    Description copied from class: `CodeVisitorSupport`
    Visits an `IfStatement`, traversing the condition, if-block, and optional else-block.
    Specified by:
      `visitIfElse` in interface `GroovyCodeVisitor`
    Overrides:
      `visitIfElse` in class `CodeVisitorSupport`
    Parameters:
      `ifElse` - the if-else statement

  - ### visitExpressionStatement

    public void visitExpressionStatement(ExpressionStatement statement)
    Description copied from class: `CodeVisitorSupport`
    Visits an `ExpressionStatement`, traversing its contained expression.
    Specified by:
      `visitExpressionStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitExpressionStatement` in class `CodeVisitorSupport`
    Parameters:
      `statement` - the expression statement

  - ### visitReturnStatement

    public void visitReturnStatement(ReturnStatement statement)
    Description copied from class: `CodeVisitorSupport`
    Visits a `ReturnStatement`, traversing its return expression.
    Specified by:
      `visitReturnStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitReturnStatement` in class `CodeVisitorSupport`
    Parameters:
      `statement` - the return statement

  - ### visitAssertStatement

    public void visitAssertStatement(AssertStatement statement)
    Description copied from class: `CodeVisitorSupport`
    Visits an `AssertStatement`, traversing the assertion condition and optional message expression.
    Specified by:
      `visitAssertStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitAssertStatement` in class `CodeVisitorSupport`
    Parameters:
      `statement` - the assert statement

  - ### visitTryCatchFinally

    public void visitTryCatchFinally(TryCatchStatement statement)
    Description copied from class: `CodeVisitorSupport`
    Visits a `TryCatchStatement`, traversing resource statements, try block, catch statements, and finally block.
    Specified by:
      `visitTryCatchFinally` in interface `GroovyCodeVisitor`
    Overrides:
      `visitTryCatchFinally` in class `CodeVisitorSupport`
    Parameters:
      `statement` - the try-catch-finally statement

  - ### visitSwitch

    public void visitSwitch(SwitchStatement statement)
    Description copied from class: `CodeVisitorSupport`
    Visits a `SwitchStatement`, traversing the switch expression, case statements, and default statement.
    Specified by:
      `visitSwitch` in interface `GroovyCodeVisitor`
    Overrides:
      `visitSwitch` in class `CodeVisitorSupport`
    Parameters:
      `statement` - the switch statement

  - ### visitCaseStatement

    public void visitCaseStatement(CaseStatement statement)
    Description copied from class: `CodeVisitorSupport`
    Visits a `CaseStatement`, traversing the case expression and code block.
    Specified by:
      `visitCaseStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitCaseStatement` in class `CodeVisitorSupport`
    Parameters:
      `statement` - the case statement

  - ### visitBreakStatement

    public void visitBreakStatement(BreakStatement statement)
    Description copied from class: `CodeVisitorSupport`
    Visits a `BreakStatement`. No traversal is performed as break statements contain no child nodes.
    Specified by:
      `visitBreakStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitBreakStatement` in class `CodeVisitorSupport`
    Parameters:
      `statement` - the break statement

  - ### visitContinueStatement

    public void visitContinueStatement(ContinueStatement statement)
    Description copied from class: `CodeVisitorSupport`
    Visits a `ContinueStatement`. No traversal is performed as continue statements contain no child nodes.
    Specified by:
      `visitContinueStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitContinueStatement` in class `CodeVisitorSupport`
    Parameters:
      `statement` - the continue statement

  - ### visitSynchronizedStatement

    public void visitSynchronizedStatement(SynchronizedStatement statement)
    Description copied from class: `CodeVisitorSupport`
    Visits a `SynchronizedStatement`, traversing the synchronization expression and code block.
    Specified by:
      `visitSynchronizedStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitSynchronizedStatement` in class `CodeVisitorSupport`
    Parameters:
      `statement` - the synchronized statement

  - ### visitThrowStatement

    public void visitThrowStatement(ThrowStatement statement)
    Description copied from class: `CodeVisitorSupport`
    Visits a `ThrowStatement`, traversing the exception expression.
    Specified by:
      `visitThrowStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitThrowStatement` in class `CodeVisitorSupport`
    Parameters:
      `statement` - the throw statement

  - ### visitStaticMethodCallExpression

    public void visitStaticMethodCallExpression(StaticMethodCallExpression call)
    Description copied from class: `CodeVisitorSupport`
    Visits a `StaticMethodCallExpression`, traversing its argument list.
    Specified by:
      `visitStaticMethodCallExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitStaticMethodCallExpression` in class `CodeVisitorSupport`
    Parameters:
      `call` - the static method call expression

  - ### visitBinaryExpression

    public void visitBinaryExpression(BinaryExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `BinaryExpression`, traversing left and right operand expressions.
    Specified by:
      `visitBinaryExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitBinaryExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the binary expression

  - ### visitTernaryExpression

    public void visitTernaryExpression(TernaryExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `TernaryExpression`, traversing the condition, true-branch, and false-branch expressions.
    Specified by:
      `visitTernaryExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitTernaryExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the ternary expression

  - ### visitShortTernaryExpression

    public void visitShortTernaryExpression(ElvisOperatorExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `ElvisOperatorExpression`, treating it as a ternary expression.
    Specified by:
      `visitShortTernaryExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitShortTernaryExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the elvis operator expression

  - ### visitPostfixExpression

    public void visitPostfixExpression(PostfixExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `PostfixExpression`, traversing the operand expression.
    Specified by:
      `visitPostfixExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitPostfixExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the postfix expression

  - ### visitPrefixExpression

    public void visitPrefixExpression(PrefixExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `PrefixExpression`, traversing the operand expression.
    Specified by:
      `visitPrefixExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitPrefixExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the prefix expression

  - ### visitBooleanExpression

    public void visitBooleanExpression(BooleanExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `BooleanExpression`, traversing the contained expression.
    Specified by:
      `visitBooleanExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitBooleanExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the boolean expression

  - ### visitNotExpression

    public void visitNotExpression(NotExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `NotExpression`, traversing the operand expression.
    Specified by:
      `visitNotExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitNotExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the not expression

  - ### visitClosureExpression

    public void visitClosureExpression(ClosureExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `ClosureExpression`, traversing parameter initializers and the closure code block.
    Specified by:
      `visitClosureExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitClosureExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the closure expression

  - ### visitTupleExpression

    public void visitTupleExpression(TupleExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `TupleExpression`, traversing all contained expressions.
    Specified by:
      `visitTupleExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitTupleExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the tuple expression

  - ### visitListExpression

    public void visitListExpression(ListExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `ListExpression`, traversing all contained expressions.
    Specified by:
      `visitListExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitListExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the list expression

  - ### visitArrayExpression

    public void visitArrayExpression(ArrayExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits an `ArrayExpression`, traversing element expressions and size expressions.
    Specified by:
      `visitArrayExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitArrayExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the array expression

  - ### visitMapExpression

    public void visitMapExpression(MapExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `MapExpression`, traversing all map entry expressions.
    Specified by:
      `visitMapExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitMapExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the map expression

  - ### visitMapEntryExpression

    public void visitMapEntryExpression(MapEntryExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `MapEntryExpression`, traversing key and value expressions.
    Specified by:
      `visitMapEntryExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitMapEntryExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the map entry expression

  - ### visitRangeExpression

    public void visitRangeExpression(RangeExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `RangeExpression`, traversing from and to boundary expressions.
    Specified by:
      `visitRangeExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitRangeExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the range expression

  - ### visitSpreadExpression

    public void visitSpreadExpression(SpreadExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `SpreadExpression`, traversing the operand expression.
    Specified by:
      `visitSpreadExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitSpreadExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the spread expression

  - ### visitSpreadMapExpression

    public void visitSpreadMapExpression(SpreadMapExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `SpreadMapExpression`, traversing the operand expression.
    Specified by:
      `visitSpreadMapExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitSpreadMapExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the spread map expression

  - ### visitMethodPointerExpression

    public void visitMethodPointerExpression(MethodPointerExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `MethodPointerExpression`, traversing the object and method name expressions.
    Specified by:
      `visitMethodPointerExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitMethodPointerExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the method pointer expression

  - ### visitUnaryMinusExpression

    public void visitUnaryMinusExpression(UnaryMinusExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `UnaryMinusExpression`, traversing the operand expression.
    Specified by:
      `visitUnaryMinusExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitUnaryMinusExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the unary minus expression

  - ### visitUnaryPlusExpression

    public void visitUnaryPlusExpression(UnaryPlusExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `UnaryPlusExpression`, traversing the operand expression.
    Specified by:
      `visitUnaryPlusExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitUnaryPlusExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the unary plus expression

  - ### visitBitwiseNegationExpression

    public void visitBitwiseNegationExpression(BitwiseNegationExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `BitwiseNegationExpression`, traversing the operand expression.
    Specified by:
      `visitBitwiseNegationExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitBitwiseNegationExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the bitwise negation expression

  - ### visitCastExpression

    public void visitCastExpression(CastExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `CastExpression`, traversing the operand expression.
    Specified by:
      `visitCastExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitCastExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the cast expression

  - ### visitConstantExpression

    public void visitConstantExpression(ConstantExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `ConstantExpression`. No traversal is performed as constants contain no child expressions.
    Specified by:
      `visitConstantExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitConstantExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the constant expression

  - ### visitClassExpression

    public void visitClassExpression(ClassExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `ClassExpression`. No traversal is performed as class expressions contain no child expressions.
    Specified by:
      `visitClassExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitClassExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the class expression

  - ### visitVariableExpression

    public void visitVariableExpression(VariableExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `VariableExpression`. No traversal is performed as variable expressions contain no child expressions.
    Specified by:
      `visitVariableExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitVariableExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the variable expression

  - ### visitDeclarationExpression

    public void visitDeclarationExpression(DeclarationExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `DeclarationExpression`, treating it as a binary expression.
    Specified by:
      `visitDeclarationExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitDeclarationExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the declaration expression

  - ### visitPropertyExpression

    public void visitPropertyExpression(PropertyExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `PropertyExpression`, traversing the object and property name expressions.
    Specified by:
      `visitPropertyExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitPropertyExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the property expression

  - ### visitAttributeExpression

    public void visitAttributeExpression(AttributeExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits an `AttributeExpression`, traversing the object and attribute name expressions.
    Specified by:
      `visitAttributeExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitAttributeExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the attribute expression

  - ### visitFieldExpression

    public void visitFieldExpression(FieldExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `FieldExpression`. No traversal is performed as field expressions contain no child expressions.
    Specified by:
      `visitFieldExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitFieldExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the field expression

  - ### visitGStringExpression

    public void visitGStringExpression(GStringExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `GStringExpression`, traversing string parts and interpolated value expressions.
    Specified by:
      `visitGStringExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitGStringExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the GString expression

  - ### visitCatchStatement

    public void visitCatchStatement(CatchStatement statement)
    Description copied from class: `CodeVisitorSupport`
    Visits a `CatchStatement`, traversing the catch block code.
    Specified by:
      `visitCatchStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitCatchStatement` in class `CodeVisitorSupport`
    Parameters:
      `statement` - the catch statement

  - ### visitArgumentlistExpression

    public void visitArgumentlistExpression(ArgumentListExpression ale)
    Description copied from class: `CodeVisitorSupport`
    Visits an `ArgumentListExpression`, treating it as a tuple expression.
    Specified by:
      `visitArgumentlistExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitArgumentlistExpression` in class `CodeVisitorSupport`
    Parameters:
      `ale` - the argument list expression

  - ### visitClosureListExpression

    public void visitClosureListExpression(ClosureListExpression cle)
    Description copied from class: `CodeVisitorSupport`
    Visits a `ClosureListExpression`, traversing all contained expressions.
    Specified by:
      `visitClosureListExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitClosureListExpression` in class `CodeVisitorSupport`
    Parameters:
      `cle` - the closure list expression

  - ### visitBytecodeExpression

    public void visitBytecodeExpression(BytecodeExpression cle)
    Description copied from class: `CodeVisitorSupport`
    Visits a `BytecodeExpression`. No traversal is performed as bytecode expressions are terminal.
    Specified by:
      `visitBytecodeExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitBytecodeExpression` in class `CodeVisitorSupport`
    Parameters:
      `cle` - the bytecode expression