Package org.codehaus.groovy.transform
package org.codehaus.groovy.transform
AST transformation framework. Base classes and utilities for implementing transformations. Includes both Java and Groovy implementations.
-
ClassDescriptionAbstract base class for AST transformations.Base class for AST Transformations which will automatically throw an
InterruptedExceptionwhen some conditions are met.Handles theActiveObjectannotation, transformingActiveMethod-annotated methods to route through an internal actor for serialised execution.This class is the base for any annotation alias processor.Class used byCompilationUnitto transform the alias class into what is needed by the compiler.This class is instantiated and invoked when an AST transformation is activated.Walks the AST and collects references to annotations that are annotated themselves byGroovyASTTransformation.This class handles the invocation of the ASTAnnotationTransformation when it is encountered by a tree walk.Shared AST utilities for theasync/await/deferlanguage features.Joint-compilation stubber forAutoClone.Handles generation of code for the @AutoClone annotation.Handles generation of code for theAutoFinalannotation.Joint-compilation stubber forAutoImplement.Generates code for the@AutoImplementannotation.Handles transformation for the @BaseScript annotation.Handles generation of code for theBuilderannotation.Base class for builder generation strategies.Holds information about a builder property.Strategy interface for builder code generation.Handles generation of code for the @Category annotation.Joint-compilation stubber forDelegate.Handles generation of code for the@DelegateannotationJoint-compilation stubber forEqualsAndHashCode.Handles generation of equals() and hashCode() methods via theEqualsAndHashCodeannotation.An AST transform with the ability to report errors.Joint-compilation stubber forExternalizeMethods.Handles generation of code for the @ExternalizeMethods annotation.Handles transformation for the @Field annotation.Joint-compilation stubber forFinal.Handles generation of code for theFinalannotation.This is an annotation on a class, currently justASTTransformation.This is an annotation on some item that indicates that an associated transform classes should be executed.Handles generation of code for the @Immutable annotation.Joint-compilation stubber forIndexedProperty.Handles generation of code for the@IndexedProperty annotation.Joint-compilation stubber forInheritConstructors.Handles generation of code for the@InheritConstructors annotation.Joint-compilation stubber forLazy.Handles generation of code for the @Lazy annotationThis class provides an AST Transformation to add a log field to a class.Base class for logging strategy implementations.Base class for logging strategy implementations supporting the v2 logging API.A LoggingStrategy defines how to wire a new logger instance into an existing class.A LoggingStrategy defines how to wire a new logger instance into an existing class.Joint-compilation stubber forMapConstructor.Handles generation of code for the @MapConstructor annotation.Handles generation of code for theMemoizedannotation.Joint-compilation stubber forNamedVariant.Handles generation of variant methods with named parameters via theNamedVariantannotation.Handles generation of code for the@NewifyAST transform.Handles generation of code for the @Sealed annotation.Handles generation of code for the @NullCheck annotation.Handles transformation for the @OperatorRename annotation.Handles transformation for the @PackageScope annotation.Local AST transform forParallel: rewrites annotatedfor-inloops intocollection.eachParallel { item -> body }.Handles generation of code for the@WithReadLock and@WithWriteLock annotation.
This transformation adds an instance of ReentrantReadWriteLock to the class.
Any method annotated with@WithReadLock will obtain a read lock and release it in a finally block.
Any method annotated with@WithWriteLock will obtain a write lock and release it in a finally block.
For more information seeWithReadLockandWithWriteLockJoint-compilation stubber forRecordBase.Handles completion of code for the @RecordType annotation.Handles generation of code for the @RecordType annotation.Handles generation of code for the @Sealed annotation.Handles sealed class permitted subclass detection.Joint-compilation stubber forSingleton.Handles generation of code for the @Singleton annotationAdds a minimalComparablesurface forSortableclasses in an earlier phase so joint compilation can evolve independently from full Sortable codegen.Injects a set of Comparators and sort methods.Handles transformation for the @SourceURI annotation.Handles the implementation of theTypeCheckedtransformation.Utilities for GEP-21 Shape C joint-compilation stubbers.Handles generation of code for the@Synchronizedannotation.Joint-compilation stubber forToString.Handles generation of code for the @ToString annotation.AST transforms may optionally implement this interface and return a priority value.Adds a placeholder tuple-style constructor surface forTupleConstructorclasses during joint compilation.Handles generation of code for the @TupleConstructor annotation.Result ofTupleConstructorASTTransformation.selectTupleProperties(org.codehaus.groovy.transform.AbstractASTTransformation, org.codehaus.groovy.ast.ClassNode, org.codehaus.groovy.ast.AnnotationNode): the super-class properties and self properties that pass the annotation's filters (includes / excludes / allNames / includeProperties / includeFields / includeSuperProperties / includeSuperFields / allProperties).