Package org.codehaus.groovy.classgen

# Class AsmClassGenerator

java.lang.Object
org.codehaus.groovy.ast.CodeVisitorSupport
org.codehaus.groovy.ast.ClassCodeVisitorSupport
org.codehaus.groovy.classgen.ClassGenerator
org.codehaus.groovy.classgen.AsmClassGenerator

All Implemented Interfaces:
  `GroovyClassVisitor`, `GroovyCodeVisitor`, `ErrorCollecting`

public class AsmClassGenerator extends ClassGenerator
Generates Java class versions of Groovy classes using ASM.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final boolean`
  `ASM_DEBUG`
  Add marker in the bytecode to show source-bytecode relationship.
  `static final boolean`
  `CREATE_DEBUG_INFO`
  `static final boolean`
  `CREATE_LINE_NUMBER_INFO`
  `static final String`
  `ELIDE_EXPRESSION_VALUE`
  `static final MethodCallerMultiAdapter`
  `getField`
  `static final MethodCallerMultiAdapter`
  `getGroovyObjectField`
  `static final String`
  `MINIMUM_BYTECODE_VERSION`
  `static final MethodCallerMultiAdapter`
  `setField`
  `static final MethodCallerMultiAdapter`
  `setGroovyObjectField`
  `static final MethodCallerMultiAdapter`
  `setProperty`

  ### Fields inherited from class org.codehaus.groovy.classgen.ClassGenerator

  `innerClasses`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AsmClassGenerator(SourceUnit source, GeneratorContext context, org.objectweb.asm.ClassVisitor classVisitor, String sourceFile)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `addInnerClass(ClassNode innerClass)`
  `static int`
  `argumentSize(Expression arguments)`
  `static boolean`
  `containsSpreadExpression(Expression expression)`
  `protected void`
  `createInterfaceSyntheticStaticFields()`
  `protected void`
  `createSyntheticStaticFields()`
  `void`
  `despreadList(List<Expression> expressions, boolean wrap)`
  `WriterController`
  `getController()`
  `static FieldNode`
  `getDeclaredFieldOfCurrentClassOrAccessibleFieldOfSuper(ClassNode accessingNode, ClassNode current, String fieldName, boolean skipCurrent)`
  `SourceUnit`
  `getSourceUnit()`
  Provides access to the `SourceUnit` for error reporting during visitation.
  `static boolean`
  `isFieldDirectlyAccessible(FieldNode field, ClassNode accessingClass)`
  Determines if the given field can be directly accessed by the given class (via `GETFIELD`, `GETSTATIC`, etc.
  `static boolean`
  `isMemberDirectlyAccessible(int modifiers, ClassNode declaringClass, ClassNode accessingClass)`
  `void`
  `loadInstanceField(FieldExpression expression)`
  RHS instance field.
  `void`
  `loadStaticField(FieldExpression expression)`
  `void`
  `loadWrapper(Expression expression)`
  `void`
  `onLineNumber(ASTNode node, String message)`
  `void`
  `throwException(String message)`
  `void`
  `visitAnnotationAttributes(AnnotationNode an, org.objectweb.asm.AnnotationVisitor av)`
  Generates the annotation attributes.
  `void`
  `visitAnnotations(AnnotatedNode node)`
  Visits annotations on an `AnnotatedNode`, delegating to `ClassCodeVisitorSupport.visitAnnotation(AnnotationNode)`.
  `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`, invoking the statement hook before parent traversal.
  `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 statement)`
  Visits a `BlockStatement`, invoking the statement hook before parent traversal.
  `void`
  `visitBooleanExpression(BooleanExpression expression)`
  Visits a `BooleanExpression`, traversing the contained expression.
  `void`
  `visitBreakStatement(BreakStatement statement)`
  Visits a `BreakStatement`, invoking the statement hook before parent traversal.
  `void`
  `visitBytecodeExpression(BytecodeExpression expression)`
  Visits a `BytecodeExpression`.
  `void`
  `visitBytecodeSequence(BytecodeSequence bytecodeSequence)`
  `void`
  `visitCaseStatement(CaseStatement statement)`
  Visits a `CaseStatement`, invoking the statement hook before parent traversal.
  `void`
  `visitCastExpression(CastExpression castExpression)`
  Visits a `CastExpression`, traversing the operand expression.
  `void`
  `visitCatchStatement(CatchStatement statement)`
  Visits a `CatchStatement`, processing variable annotations and invoking the statement hook.
  `void`
  `visitClass(ClassNode classNode)`
  Visits a `ClassNode`, processing its annotations, package, imports, contents, and object initializers.
  `void`
  `visitClassExpression(ClassExpression expression)`
  Visits a `ClassExpression`.
  `void`
  `visitClosureExpression(ClosureExpression expression)`
  Visits a `ClosureExpression` with annotation processing, traversing parameter annotations before delegating to parent traversal.
  `void`
  `visitClosureListExpression(ClosureListExpression expression)`
  Visits a `ClosureListExpression`, traversing all contained expressions.
  `void`
  `visitConstantExpression(ConstantExpression expression)`
  Generates byte code for constants.
  `void`
  `visitConstructor(ConstructorNode node)`
  Visits a `ConstructorNode`, processing its annotations, parameter annotations, and code block.
  `void`
  `visitConstructorCallExpression(ConstructorCallExpression call)`
  Visits a `ConstructorCallExpression`, traversing its argument list.
  `protected void`
  `visitConstructorOrMethod(MethodNode node, boolean isConstructor)`
  Visits a constructor or method node (implementation detail for both visit methods).
  `void`
  `visitContinueStatement(ContinueStatement statement)`
  Visits a `ContinueStatement`, invoking the statement hook before parent traversal.
  `void`
  `visitDeclarationExpression(DeclarationExpression expression)`
  Visits a `DeclarationExpression` with annotation processing, traversing expression annotations before delegating to parent traversal.
  `void`
  `visitDoWhileLoop(DoWhileStatement statement)`
  Visits a `DoWhileStatement`, invoking statement hooks before parent traversal.
  `void`
  `visitExpressionStatement(ExpressionStatement statement)`
  Visits an `ExpressionStatement`, invoking the statement hook before parent traversal.
  `void`
  `visitField(FieldNode fieldNode)`
  Visits a `FieldNode`, processing its annotations and initial value expression if present.
  `void`
  `visitFieldExpression(FieldExpression expression)`
  Visits a `FieldExpression`.
  `void`
  `visitForLoop(ForStatement statement)`
  Visits a `ForStatement`, invoking statement hooks and processing loop variable annotations.
  `void`
  `visitGStringExpression(GStringExpression expression)`
  Visits a `GStringExpression`, traversing string parts and interpolated value expressions.
  `void`
  `visitIfElse(IfStatement statement)`
  Visits an `IfStatement`, invoking the statement hook before parent traversal.
  `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`
  `visitMethod(MethodNode node)`
  Visits a `MethodNode`, processing its annotations, parameter annotations, and code block.
  `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`
  `visitProperty(PropertyNode statement)`
  Visits a `PropertyNode`, processing its annotations, initial value expression, and getter/setter blocks if present.
  `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`, invoking the statement hook before parent traversal.
  `void`
  `visitSpreadExpression(SpreadExpression expression)`
  Visits a `SpreadExpression`, traversing the operand expression.
  `void`
  `visitSpreadMapExpression(SpreadMapExpression expression)`
  Visits a `SpreadMapExpression`, traversing the operand expression.
  `protected void`
  `visitStatement(Statement statement)`
  Hook method called when visiting any `Statement`.
  `void`
  `visitStaticMethodCallExpression(StaticMethodCallExpression call)`
  Visits a `StaticMethodCallExpression`, traversing its argument list.
  `void`
  `visitSwitch(SwitchStatement statement)`
  Visits a `SwitchStatement`, invoking the statement hook before parent traversal.
  `void`
  `visitSynchronizedStatement(SynchronizedStatement statement)`
  Visits a `SynchronizedStatement`, invoking the statement hook before parent traversal.
  `void`
  `visitTernaryExpression(TernaryExpression expression)`
  Visits a `TernaryExpression`, traversing the condition, true-branch, and false-branch expressions.
  `void`
  `visitThrowStatement(ThrowStatement statement)`
  Visits a `ThrowStatement`, invoking the statement hook before parent traversal.
  `void`
  `visitTryCatchFinally(TryCatchStatement statement)`
  Visits a `TryCatchStatement`, invoking the statement hook before parent traversal.
  `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`, invoking statement hooks before parent traversal.

  ### Methods inherited from class org.codehaus.groovy.classgen.ClassGenerator

  `getInnerClasses`

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

  `addError, visitAnnotation, visitAnnotations, visitClassCodeContainer, visitImports, visitObjectInitializerStatements, visitPackage, visitStatementAnnotations`

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

  `afterSwitchCaseStatementsVisited, afterSwitchConditionExpressionVisited, visitEmptyStatement, visitShortTernaryExpression`

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

- ## Field Details

  - ### setField

    public static final MethodCallerMultiAdapter setField

  - ### getField

    public static final MethodCallerMultiAdapter getField

  - ### setGroovyObjectField

    public static final MethodCallerMultiAdapter setGroovyObjectField

  - ### getGroovyObjectField

    public static final MethodCallerMultiAdapter getGroovyObjectField

  - ### setProperty

    public static final MethodCallerMultiAdapter setProperty

  - ### ASM_DEBUG

    public static final boolean ASM_DEBUG
    Add marker in the bytecode to show source-bytecode relationship.
    See Also:
      - Constant Field Values

  - ### CREATE_DEBUG_INFO

    public static final boolean CREATE_DEBUG_INFO
    See Also:
      - Constant Field Values

  - ### CREATE_LINE_NUMBER_INFO

    public static final boolean CREATE_LINE_NUMBER_INFO
    See Also:
      - Constant Field Values

  - ### ELIDE_EXPRESSION_VALUE

    public static final String ELIDE_EXPRESSION_VALUE
    See Also:
      - Constant Field Values

  - ### MINIMUM_BYTECODE_VERSION

    public static final String MINIMUM_BYTECODE_VERSION
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### AsmClassGenerator

    public AsmClassGenerator(SourceUnit source, GeneratorContext context, org.objectweb.asm.ClassVisitor classVisitor, String sourceFile)

- ## Method Details

  - ### getSourceUnit

    public SourceUnit getSourceUnit()
    Description copied from class: `ClassCodeVisitorSupport`
    Provides access to the `SourceUnit` for error reporting during visitation. Implementations must override this method.
    Overrides:
      `getSourceUnit` in class `ClassGenerator`
    Returns:
      the source unit for this visitor

  - ### getController

    public WriterController getController()

  - ### visitClass

    public void visitClass(ClassNode classNode)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `ClassNode`, processing its annotations, package, imports, contents, and object initializers.
    Specified by:
      `visitClass` in interface `GroovyClassVisitor`
    Overrides:
      `visitClass` in class `ClassCodeVisitorSupport`
    Parameters:
      `classNode` - the class node to visit

  - ### visitConstructorOrMethod

    protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a constructor or method node (implementation detail for both visit methods). Processes the node's annotations, all parameter annotations, and code block.
    Overrides:
      `visitConstructorOrMethod` in class `ClassCodeVisitorSupport`
    Parameters:
      `node` - the method or constructor node
      `isConstructor` - true if node is a constructor, false if it is a method

  - ### visitConstructor

    public void visitConstructor(ConstructorNode node)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `ConstructorNode`, processing its annotations, parameter annotations, and code block.
    Specified by:
      `visitConstructor` in interface `GroovyClassVisitor`
    Overrides:
      `visitConstructor` in class `ClassCodeVisitorSupport`
    Parameters:
      `node` - the constructor node to visit

  - ### visitMethod

    public void visitMethod(MethodNode node)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `MethodNode`, processing its annotations, parameter annotations, and code block.
    Specified by:
      `visitMethod` in interface `GroovyClassVisitor`
    Overrides:
      `visitMethod` in class `ClassCodeVisitorSupport`
    Parameters:
      `node` - the method node to visit

  - ### visitField

    public void visitField(FieldNode fieldNode)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `FieldNode`, processing its annotations and initial value expression if present.
    Specified by:
      `visitField` in interface `GroovyClassVisitor`
    Overrides:
      `visitField` in class `ClassCodeVisitorSupport`
    Parameters:
      `fieldNode` - the field node to visit

  - ### visitProperty

    public void visitProperty(PropertyNode statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `PropertyNode`, processing its annotations, initial value expression, and getter/setter blocks if present.
    Specified by:
      `visitProperty` in interface `GroovyClassVisitor`
    Overrides:
      `visitProperty` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the property node to visit

  - ### visitStatement

    protected void visitStatement(Statement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Hook method called when visiting any `Statement`. Subclasses may override to perform common processing on all statements.
    Overrides:
      `visitStatement` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the statement being visited

  - ### visitBlockStatement

    public void visitBlockStatement(BlockStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `BlockStatement`, invoking the statement hook before parent traversal.
    Specified by:
      `visitBlockStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitBlockStatement` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the block statement to visit
    See Also:
      - `CodeVisitorSupport.visitForLoop(ForStatement)`
      - `CodeVisitorSupport.visitWhileLoop(WhileStatement)`

  - ### visitForLoop

    public void visitForLoop(ForStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `ForStatement`, invoking statement hooks and processing loop variable annotations.
    Specified by:
      `visitForLoop` in interface `GroovyCodeVisitor`
    Overrides:
      `visitForLoop` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the for statement to visit

  - ### visitWhileLoop

    public void visitWhileLoop(WhileStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `WhileStatement`, invoking statement hooks before parent traversal.
    Specified by:
      `visitWhileLoop` in interface `GroovyCodeVisitor`
    Overrides:
      `visitWhileLoop` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the while statement to visit

  - ### visitDoWhileLoop

    public void visitDoWhileLoop(DoWhileStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `DoWhileStatement`, invoking statement hooks before parent traversal.
    Specified by:
      `visitDoWhileLoop` in interface `GroovyCodeVisitor`
    Overrides:
      `visitDoWhileLoop` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the do-while statement to visit

  - ### visitIfElse

    public void visitIfElse(IfStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits an `IfStatement`, invoking the statement hook before parent traversal.
    Specified by:
      `visitIfElse` in interface `GroovyCodeVisitor`
    Overrides:
      `visitIfElse` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the if statement to visit

  - ### visitAssertStatement

    public void visitAssertStatement(AssertStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits an `AssertStatement`, invoking the statement hook before parent traversal.
    Specified by:
      `visitAssertStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitAssertStatement` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the assert statement to visit

  - ### visitTryCatchFinally

    public void visitTryCatchFinally(TryCatchStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `TryCatchStatement`, invoking the statement hook before parent traversal.
    Specified by:
      `visitTryCatchFinally` in interface `GroovyCodeVisitor`
    Overrides:
      `visitTryCatchFinally` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the try-catch statement to visit

  - ### visitCatchStatement

    public void visitCatchStatement(CatchStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `CatchStatement`, processing variable annotations and invoking the statement hook.
    Specified by:
      `visitCatchStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitCatchStatement` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the catch statement to visit

  - ### visitSwitch

    public void visitSwitch(SwitchStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `SwitchStatement`, invoking the statement hook before parent traversal.
    Specified by:
      `visitSwitch` in interface `GroovyCodeVisitor`
    Overrides:
      `visitSwitch` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the switch statement to visit

  - ### visitCaseStatement

    public void visitCaseStatement(CaseStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `CaseStatement`, invoking the statement hook before parent traversal.
    Specified by:
      `visitCaseStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitCaseStatement` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the case statement to visit

  - ### visitBreakStatement

    public void visitBreakStatement(BreakStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `BreakStatement`, invoking the statement hook before parent traversal.
    Specified by:
      `visitBreakStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitBreakStatement` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the break statement to visit

  - ### visitContinueStatement

    public void visitContinueStatement(ContinueStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `ContinueStatement`, invoking the statement hook before parent traversal.
    Specified by:
      `visitContinueStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitContinueStatement` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the continue statement to visit

  - ### visitSynchronizedStatement

    public void visitSynchronizedStatement(SynchronizedStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `SynchronizedStatement`, invoking the statement hook before parent traversal.
    Specified by:
      `visitSynchronizedStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitSynchronizedStatement` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the synchronized statement to visit

  - ### visitThrowStatement

    public void visitThrowStatement(ThrowStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `ThrowStatement`, invoking the statement hook before parent traversal.
    Specified by:
      `visitThrowStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitThrowStatement` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the throw statement to visit

  - ### visitReturnStatement

    public void visitReturnStatement(ReturnStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `ReturnStatement`, invoking the statement hook before parent traversal.
    Specified by:
      `visitReturnStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitReturnStatement` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the return statement to visit

  - ### visitExpressionStatement

    public void visitExpressionStatement(ExpressionStatement statement)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits an `ExpressionStatement`, invoking the statement hook before parent traversal.
    Specified by:
      `visitExpressionStatement` in interface `GroovyCodeVisitor`
    Overrides:
      `visitExpressionStatement` in class `ClassCodeVisitorSupport`
    Parameters:
      `statement` - the expression statement to visit

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

  - ### visitDeclarationExpression

    public void visitDeclarationExpression(DeclarationExpression expression)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `DeclarationExpression` with annotation processing, traversing expression annotations before delegating to parent traversal.
    Specified by:
      `visitDeclarationExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitDeclarationExpression` in class `ClassCodeVisitorSupport`
    Parameters:
      `expression` - the declaration expression to visit

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

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

  - ### visitClosureExpression

    public void visitClosureExpression(ClosureExpression expression)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits a `ClosureExpression` with annotation processing, traversing parameter annotations before delegating to parent traversal.
    Specified by:
      `visitClosureExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitClosureExpression` in class `ClassCodeVisitorSupport`
    Parameters:
      `expression` - the closure expression to visit

  - ### visitLambdaExpression

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

  - ### visitConstantExpression

    public void visitConstantExpression(ConstantExpression expression)
    Generates byte code for constants.
    Specified by:
      `visitConstantExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitConstantExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the constant expression
    See Also:
      - Class field types

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

  - ### visitMethodReferenceExpression

    public void visitMethodReferenceExpression(MethodReferenceExpression expression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `MethodReferenceExpression`, treating it as a method pointer.
    Specified by:
      `visitMethodReferenceExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitMethodReferenceExpression` in class `CodeVisitorSupport`
    Parameters:
      `expression` - the method reference 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 castExpression)
    Description copied from class: `CodeVisitorSupport`
    Visits a `CastExpression`, traversing the operand expression.
    Specified by:
      `visitCastExpression` in interface `GroovyCodeVisitor`
    Overrides:
      `visitCastExpression` in class `CodeVisitorSupport`
    Parameters:
      `castExpression` - the cast 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

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

  - ### visitMethodCallExpression

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

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

  - ### visitConstructorCallExpression

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

  - ### isFieldDirectlyAccessible

    public static boolean isFieldDirectlyAccessible(FieldNode field, ClassNode accessingClass)
    Determines if the given field can be directly accessed by the given class (via `GETFIELD`, `GETSTATIC`, etc. bytecode instructions).

  - ### isMemberDirectlyAccessible

    public static boolean isMemberDirectlyAccessible(int modifiers, ClassNode declaringClass, ClassNode accessingClass)

  - ### getDeclaredFieldOfCurrentClassOrAccessibleFieldOfSuper

    public static FieldNode getDeclaredFieldOfCurrentClassOrAccessibleFieldOfSuper(ClassNode accessingNode, ClassNode current, String fieldName, boolean skipCurrent)

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

  - ### loadStaticField

    public void loadStaticField(FieldExpression expression)

  - ### loadInstanceField

    public void loadInstanceField(FieldExpression expression)
    RHS instance field. should move most of the code in the BytecodeHelper

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

  - ### createInterfaceSyntheticStaticFields

    protected void createInterfaceSyntheticStaticFields()

  - ### createSyntheticStaticFields

    protected void createSyntheticStaticFields()

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

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

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

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

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

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

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

  - ### visitClosureListExpression

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

  - ### visitBytecodeExpression

    public void visitBytecodeExpression(BytecodeExpression expression)
    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:
      `expression` - the bytecode expression

  - ### visitBytecodeSequence

    public void visitBytecodeSequence(BytecodeSequence bytecodeSequence)
    Overrides:
      `visitBytecodeSequence` in class `ClassGenerator`

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

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

  - ### visitAnnotations

    public void visitAnnotations(AnnotatedNode node)
    Description copied from class: `ClassCodeVisitorSupport`
    Visits annotations on an `AnnotatedNode`, delegating to `ClassCodeVisitorSupport.visitAnnotation(AnnotationNode)`.
    Overrides:
      `visitAnnotations` in class `ClassCodeVisitorSupport`
    Parameters:
      `node` - the annotated node containing annotations to visit

  - ### visitAnnotationAttributes

    public void visitAnnotationAttributes(AnnotationNode an, org.objectweb.asm.AnnotationVisitor av)
    Generates the annotation attributes.
    Parameters:
      `an` - the node with an annotation
      `av` - the visitor to use

  - ### addInnerClass

    public boolean addInnerClass(ClassNode innerClass)

  - ### argumentSize

    public static int argumentSize(Expression arguments)

  - ### containsSpreadExpression

    public static boolean containsSpreadExpression(Expression expression)

  - ### despreadList

    public void despreadList(List<Expression> expressions, boolean wrap)

  - ### loadWrapper

    public void loadWrapper(Expression expression)

  - ### onLineNumber

    public void onLineNumber(ASTNode node, String message)

  - ### throwException

    public void throwException(String message)