Package org.codehaus.groovy.ast

# Class CodeVisitorSupport

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

All Implemented Interfaces:
  `GroovyCodeVisitor`

Direct Known Subclasses:
  `ClassCodeVisitorSupport`, `ClosureWriter.CorrectAccessedVariableVisitor`, `GinqAstBaseVisitor`, `GinqAstBuilder`, `MethodInvocationTrap`, `ReturnAdderForClosures`, `SqlWhereVisitor`, `StatementReplacer`, `TransformingCodeVisitor`, `VariableExpressionReplacer`, `VerifierCodeVisitor`

public abstract class CodeVisitorSupport extends Object implements GroovyCodeVisitor
Abstract base class for implementing the `GroovyCodeVisitor` interface, providing default implementations for all visit methods that perform depth-first traversal of the AST.

This class implements the visitor design pattern for Groovy AST nodes. Subclasses may override specific visit methods to perform custom processing, while other visit methods automatically traverse child nodes. Default implementations delegate to child nodes, allowing for simple tree traversal without accumulating logic in each subclass.

The traversal pattern follows the structure of the AST:

- Block and control flow statements recursively visit their contained statements
- Expressions recursively visit their operand expressions
- Terminal expressions (constants, variables) perform no traversal

Subclasses typically override `visit*` methods of interest and call `super.visit*(node)` to maintain the default traversal behavior or to perform post-processing after traversing children.

See Also:
  - `GroovyCodeVisitor`
  - `for class-level visitor support`
  - `for transforming visitor implementation`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CodeVisitorSupport()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `afterSwitchCaseStatementsVisited(SwitchStatement statement)`
  Hook method called after all case statements are visited, but before the default statement.
  `protected void`
  `afterSwitchConditionExpressionVisited(SwitchStatement statement)`
  Hook method called after the switch condition expression is visited, but before case statements.
  `void`
  `visitArgumentlistExpression(ArgumentListExpression expression)`
  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`, traversing each contained statement in order.
  `void`
  `visitBooleanExpression(BooleanExpression expression)`
  Visits a `BooleanExpression`, traversing the contained expression.
  `void`
  `visitBreakStatement(BreakStatement statement)`
  Visits a `BreakStatement`.
  `void`
  `visitBytecodeExpression(BytecodeExpression expression)`
  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 expression)`
  Visits a `ClosureListExpression`, traversing all contained expressions.
  `void`
  `visitConstantExpression(ConstantExpression expression)`
  Visits a `ConstantExpression`.
  `void`
  `visitConstructorCallExpression(ConstructorCallExpression call)`
  Visits a `ConstructorCallExpression`, traversing its argument list.
  `void`
  `visitContinueStatement(ContinueStatement statement)`
  Visits a `ContinueStatement`.
  `void`
  `visitDeclarationExpression(DeclarationExpression expression)`
  Visits a `DeclarationExpression`, treating it as a binary expression.
  `void`
  `visitDoWhileLoop(DoWhileStatement statement)`
  Visits a `DoWhileStatement`, traversing the loop body before the boolean condition.
  `void`
  `visitEmptyStatement(EmptyStatement statement)`
  Visits an `EmptyStatement`.
  `void`
  `visitExpressionStatement(ExpressionStatement statement)`
  Visits an `ExpressionStatement`, traversing its contained expression.
  `void`
  `visitFieldExpression(FieldExpression expression)`
  Visits a `FieldExpression`.
  `void`
  `visitForLoop(ForStatement statement)`
  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 statement)`
  Visits an `IfStatement`, traversing the condition, if-block, and optional else-block.
  `void`
  `visitLambdaExpression(LambdaExpression expression)`
  Visits a `LambdaExpression`, treating it as a closure expression.
  `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`
  `visitMethodCallExpression(MethodCallExpression call)`
  Visits a `MethodCallExpression`, traversing the object expression, method expression, and argument list.
  `void`
  `visitMethodPointerExpression(MethodPointerExpression expression)`
  Visits a `MethodPointerExpression`, traversing the object and method name expressions.
  `void`
  `visitMethodReferenceExpression(MethodReferenceExpression expression)`
  Visits a `MethodReferenceExpression`, treating it as a method pointer.
  `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 statement)`
  Visits a `WhileStatement`, traversing the boolean condition and loop body.

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

  - ### CodeVisitorSupport

    public CodeVisitorSupport()

- ## Method Details

  - ### visitBlockStatement

    public void visitBlockStatement(BlockStatement block)
    Visits a `BlockStatement`, traversing each contained statement in order.
    Specified by:
      `visitBlockStatement` in interface `GroovyCodeVisitor`
    Parameters:
      `block` - the block statement to visit, may contain multiple statements
    See Also:
      - `visitForLoop(ForStatement)`
      - `visitWhileLoop(WhileStatement)`

  - ### visitForLoop

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

  - ### visitWhileLoop

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

  - ### visitDoWhileLoop

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

  - ### visitIfElse

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

  - ### visitExpressionStatement

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

  - ### visitReturnStatement

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

  - ### visitAssertStatement

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

  - ### visitTryCatchFinally

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

  - ### visitCatchStatement

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

  - ### visitSwitch

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

  - ### afterSwitchConditionExpressionVisited

    protected void afterSwitchConditionExpressionVisited(SwitchStatement statement)
    Hook method called after the switch condition expression is visited, but before case statements. Subclasses may override to perform processing between condition and cases.
    Parameters:
      `statement` - the switch statement being visited
    Since:
      3.0.0

  - ### afterSwitchCaseStatementsVisited

    protected void afterSwitchCaseStatementsVisited(SwitchStatement statement)
    Hook method called after all case statements are visited, but before the default statement. Subclasses may override to perform processing between cases and default.
    Parameters:
      `statement` - the switch statement being visited
    Since:
      5.0.0

  - ### visitCaseStatement

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

  - ### visitBreakStatement

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

  - ### visitContinueStatement

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

  - ### visitSynchronizedStatement

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

  - ### visitThrowStatement

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

  - ### visitEmptyStatement

    public void visitEmptyStatement(EmptyStatement statement)
    Visits an `EmptyStatement`. No traversal is performed as empty statements contain no child nodes.
    Specified by:
      `visitEmptyStatement` in interface `GroovyCodeVisitor`
    Parameters:
      `statement` - the empty statement

  - ### visitMethodCallExpression

    public void visitMethodCallExpression(MethodCallExpression call)
    Visits a `MethodCallExpression`, traversing the object expression, method expression, and argument list.
    Specified by:
      `visitMethodCallExpression` in interface `GroovyCodeVisitor`
    Parameters:
      `call` - the method call expression

  - ### visitStaticMethodCallExpression

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

  - ### visitConstructorCallExpression

    public void visitConstructorCallExpression(ConstructorCallExpression call)
    Visits a `ConstructorCallExpression`, traversing its argument list.
    Specified by:
      `visitConstructorCallExpression` in interface `GroovyCodeVisitor`
    Parameters:
      `call` - the constructor call expression

  - ### visitBinaryExpression

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

  - ### visitTernaryExpression

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

  - ### visitShortTernaryExpression

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

  - ### visitPostfixExpression

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

  - ### visitPrefixExpression

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

  - ### visitBooleanExpression

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

  - ### visitNotExpression

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

  - ### visitClosureExpression

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

  - ### visitLambdaExpression

    public void visitLambdaExpression(LambdaExpression expression)
    Visits a `LambdaExpression`, treating it as a closure expression.
    Specified by:
      `visitLambdaExpression` in interface `GroovyCodeVisitor`
    Parameters:
      `expression` - the lambda expression

  - ### visitTupleExpression

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

  - ### visitListExpression

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

  - ### visitArrayExpression

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

  - ### visitMapExpression

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

  - ### visitMapEntryExpression

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

  - ### visitRangeExpression

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

  - ### visitSpreadExpression

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

  - ### visitSpreadMapExpression

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

  - ### visitMethodPointerExpression

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

  - ### visitMethodReferenceExpression

    public void visitMethodReferenceExpression(MethodReferenceExpression expression)
    Visits a `MethodReferenceExpression`, treating it as a method pointer.
    Specified by:
      `visitMethodReferenceExpression` in interface `GroovyCodeVisitor`
    Parameters:
      `expression` - the method reference expression

  - ### visitUnaryMinusExpression

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

  - ### visitUnaryPlusExpression

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

  - ### visitBitwiseNegationExpression

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

  - ### visitCastExpression

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

  - ### visitConstantExpression

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

  - ### visitClassExpression

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

  - ### visitVariableExpression

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

  - ### visitDeclarationExpression

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

  - ### visitPropertyExpression

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

  - ### visitAttributeExpression

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

  - ### visitFieldExpression

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

  - ### visitGStringExpression

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

  - ### visitArgumentlistExpression

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

  - ### visitClosureListExpression

    public void visitClosureListExpression(ClosureListExpression expression)
    Visits a `ClosureListExpression`, traversing all contained expressions.
    Specified by:
      `visitClosureListExpression` in interface `GroovyCodeVisitor`
    Parameters:
      `expression` - the closure list expression

  - ### visitBytecodeExpression

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