Class ClassCodeVisitorSupport

java.lang.Object
org.codehaus.groovy.ast.CodeVisitorSupport
org.codehaus.groovy.ast.ClassCodeVisitorSupport
All Implemented Interfaces:
GroovyClassVisitor, GroovyCodeVisitor, ErrorCollecting
Direct Known Subclasses:
AbstractInterruptibleASTTransformation, AnnotationConstantsVisitor, AssertStatementCreationUtility.AddAssertionCallStatementToReturnStatementVisitor, AssertStatementCreationUtility.AddResultReturnStatementVisitor, AssertStatementCreationUtility.ReturnStatementVisitor, ASTTransformationCollectorCodeVisitor, ASTTransformationVisitor, BaseVisitor, ClassCodeExpressionTransformer, ClassCompletionVerifier, ClassGenerator, ContextualClassCodeVisitor, DependencyTracker, EnumCompletionVisitor, EnumVisitor, ExtendedVerifier, FinalVariableAnalyzer, GenericsVisitor, GrabAnnotationTransformation, GroovydocVisitor, InnerClassVisitorHelper, InstanceOfVerifier, LabelVerifier, PlaceholderVisitor, SharedVariableCollector, StaticTypeCheckingVisitor, StaticTypeCheckingVisitor.VariableExpressionTypeMemoizer, StaticVerifier, VariableScopeVisitor

public abstract class ClassCodeVisitorSupport extends CodeVisitorSupport implements ErrorCollecting, GroovyClassVisitor
Abstract base class for visitors that process class nodes and their members, extending the default visitor traversal with class-specific and annotation processing.

This visitor combines CodeVisitorSupport with GroovyClassVisitor to provide comprehensive traversal of class structures including:

  • Class-level annotations and package/import declarations
  • Class contents (fields, methods, properties) with member-level annotations
  • Method parameters and their annotations
  • Object initializer statements

Subclasses typically override specific visit methods to perform custom processing while inheriting default traversal behavior. Common extension points include:

Implementations must provide getSourceUnit() to support error reporting. The ErrorCollecting interface enables error accumulation during traversal.

See Also: