AbstractASTTransformation (Groovy 5.1.0)
Description: declaration: package: org.codehaus.groovy.transform, class: AbstractASTTransformation

Package org.codehaus.groovy.transform

# Class AbstractASTTransformation

java.lang.Object
org.codehaus.groovy.transform.AbstractASTTransformation

All Implemented Interfaces:
  `ASTTransformation`, `ErrorCollecting`

Direct Known Subclasses:
  `AutoCloneASTTransformation`, `AutoFinalASTTransformation`, `AutoImplementASTTransformation`, `BaseScriptASTTransformation`, `BuilderASTTransformation`, `DelegateASTTransformation`, `EqualsAndHashCodeASTTransformation`, `ExternalizeMethodsASTTransformation`, `ExternalizeVerifierASTTransformation`, `FinalASTTransformation`, `GinqASTTransformation`, `ImmutableASTTransformation`, `IndexedPropertyASTTransformation`, `InheritConstructorsASTTransformation`, `LazyASTTransformation`, `LogASTTransformation`, `MapConstructorASTTransformation`, `MemoizedASTTransformation`, `MixinASTTransformation`, `NamedVariantASTTransformation`, `NonSealedASTTransformation`, `NotYetImplementedASTTransformation`, `NullCheckASTTransformation`, `PackageScopeASTTransformation`, `ReadWriteLockASTTransformation`, `RecordCompletionASTTransformation`, `RecordTypeASTTransformation`, `SealedASTTransformation`, `SealedCompletionASTTransformation`, `SingletonASTTransformation`, `SortableASTTransformation`, `SourceURIASTTransformation`, `SynchronizedASTTransformation`, `TailRecursiveASTTransformation`, `ToStringASTTransformation`, `TraitASTTransformation`, `TupleConstructorASTTransformation`

public abstract class AbstractASTTransformation extends Object implements ASTTransformation, ErrorCollecting

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final ClassNode`
  `RETENTION_CLASSNODE`
  `protected SourceUnit`
  `sourceUnit`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractASTTransformation()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addError(String msg, ASTNode node)`
  `protected boolean`
  `checkIncludeExcludeUndefinedAware(AnnotationNode node, List<String> excludes, List<String> includes, String typeName)`
  `protected void`
  `checkIncludeExcludeUndefinedAware(AnnotationNode node, List<String> excludes, List<String> includes, List<ClassNode> excludeTypes, List<ClassNode> includeTypes, String typeName)`
  `protected boolean`
  `checkNotInterface(ClassNode cNode, String annotationName)`
  `boolean`
  `checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields)`
  `boolean`
  `checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields, boolean includeSuperProperties, boolean allProperties)`
  `boolean`
  `checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields, boolean includeSuperProperties, boolean allProperties, boolean includeSuperFields, boolean includeStatic)`
  `protected List<AnnotationNode>`
  `copyAnnotatedNodeAnnotations(AnnotatedNode annotatedNode, String myTypeName)`
  Copies all `candidateAnnotations` with retention policy `RetentionPolicy.RUNTIME` and `RetentionPolicy.CLASS`.
  `protected List<AnnotationNode>`
  `copyAnnotatedNodeAnnotations(AnnotatedNode annotatedNode, String myTypeName, boolean includeGenerated)`
  Copies all `candidateAnnotations` with retention policy `RetentionPolicy.RUNTIME` and `RetentionPolicy.CLASS`.
  `static boolean`
  `deemedInternalName(String name)`
  `String`
  `getAnnotationName()`
  If the transform is associated with a single annotation, returns a name suitable for displaying in error messages.
  `List<ClassNode>`
  `getMemberClassList(AnnotationNode anno, String name)`
  `ClassNode`
  `getMemberClassValue(AnnotationNode node, String name)`
  `ClassNode`
  `getMemberClassValue(AnnotationNode node, String name, ClassNode defaultValue)`
  `int`
  `getMemberIntValue(AnnotationNode node, String name)`
  `static List<String>`
  `getMemberStringList(AnnotationNode anno, String name)`
  `static String`
  `getMemberStringValue(AnnotationNode node, String name)`
  `static String`
  `getMemberStringValue(AnnotationNode node, String name, String defaultValue)`
  `Object`
  `getMemberValue(AnnotationNode node, String name)`
  `boolean`
  `hasAnnotation(ClassNode node, ClassNode annotation)`
  `protected void`
  `init(ASTNode[] nodes, SourceUnit sourceUnit)`
  `boolean`
  `memberHasValue(AnnotationNode node, String name, Object value)`
  `static boolean`
  `shouldSkip(String name, List<String> excludes, List<String> includes)`
  `static boolean`
  `shouldSkip(String name, List<String> excludes, List<String> includes, boolean allNames)`
  `static boolean`
  `shouldSkipOnDescriptorUndefinedAware(boolean checkReturn, Map genericsSpec, MethodNode mNode, List<ClassNode> excludeTypes, List<ClassNode> includeTypes)`
  `static boolean`
  `shouldSkipUndefinedAware(String name, List<String> excludes, List<String> includes)`
  `static boolean`
  `shouldSkipUndefinedAware(String name, List<String> excludes, List<String> includes, boolean allNames)`
  `static List<String>`
  `tokenize(String rawExcludes)`

  ### 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.transform.ASTTransformation

  `visit`

- ## Field Details

  - ### RETENTION_CLASSNODE

    public static final ClassNode RETENTION_CLASSNODE

  - ### sourceUnit

    protected SourceUnit sourceUnit

- ## Constructor Details

  - ### AbstractASTTransformation

    public AbstractASTTransformation()

- ## Method Details

  - ### copyAnnotatedNodeAnnotations

    protected List<AnnotationNode> copyAnnotatedNodeAnnotations(AnnotatedNode annotatedNode, String myTypeName)
    Copies all `candidateAnnotations` with retention policy `RetentionPolicy.RUNTIME` and `RetentionPolicy.CLASS`.

    Annotations with `GeneratedClosure` members are not supported for now.

  - ### copyAnnotatedNodeAnnotations

    protected List<AnnotationNode> copyAnnotatedNodeAnnotations(AnnotatedNode annotatedNode, String myTypeName, boolean includeGenerated)
    Copies all `candidateAnnotations` with retention policy `RetentionPolicy.RUNTIME` and `RetentionPolicy.CLASS`.

    Annotations with `GeneratedClosure` members are not supported for now.

  - ### getAnnotationName

    public String getAnnotationName()
    If the transform is associated with a single annotation, returns a name suitable for displaying in error messages.
    Returns:
      The simple name of the annotation including the "@" or null if no such name is defined

  - ### init

    protected void init(ASTNode[] nodes, SourceUnit sourceUnit)

  - ### memberHasValue

    public boolean memberHasValue(AnnotationNode node, String name, Object value)

  - ### getMemberValue

    public Object getMemberValue(AnnotationNode node, String name)

  - ### getMemberStringValue

    public static String getMemberStringValue(AnnotationNode node, String name, String defaultValue)

  - ### getMemberStringValue

    public static String getMemberStringValue(AnnotationNode node, String name)

  - ### getMemberIntValue

    public int getMemberIntValue(AnnotationNode node, String name)

  - ### getMemberClassValue

    public ClassNode getMemberClassValue(AnnotationNode node, String name)

  - ### getMemberClassValue

    public ClassNode getMemberClassValue(AnnotationNode node, String name, ClassNode defaultValue)

  - ### getMemberStringList

    public static List<String> getMemberStringList(AnnotationNode anno, String name)

  - ### getMemberClassList

    public List<ClassNode> getMemberClassList(AnnotationNode anno, String name)

  - ### addError

    public void addError(String msg, ASTNode node)
    Specified by:
      `addError` in interface `ErrorCollecting`

  - ### checkNotInterface

    protected boolean checkNotInterface(ClassNode cNode, String annotationName)

  - ### hasAnnotation

    public boolean hasAnnotation(ClassNode node, ClassNode annotation)

  - ### tokenize

    public static List<String> tokenize(String rawExcludes)

  - ### deemedInternalName

    public static boolean deemedInternalName(String name)

  - ### shouldSkipUndefinedAware

    public static boolean shouldSkipUndefinedAware(String name, List<String> excludes, List<String> includes)

  - ### shouldSkipUndefinedAware

    public static boolean shouldSkipUndefinedAware(String name, List<String> excludes, List<String> includes, boolean allNames)

  - ### shouldSkip

    public static boolean shouldSkip(String name, List<String> excludes, List<String> includes)

  - ### shouldSkip

    public static boolean shouldSkip(String name, List<String> excludes, List<String> includes, boolean allNames)

  - ### shouldSkipOnDescriptorUndefinedAware

    public static boolean shouldSkipOnDescriptorUndefinedAware(boolean checkReturn, Map genericsSpec, MethodNode mNode, List<ClassNode> excludeTypes, List<ClassNode> includeTypes)

  - ### checkIncludeExcludeUndefinedAware

    protected boolean checkIncludeExcludeUndefinedAware(AnnotationNode node, List<String> excludes, List<String> includes, String typeName)

  - ### checkIncludeExcludeUndefinedAware

    protected void checkIncludeExcludeUndefinedAware(AnnotationNode node, List<String> excludes, List<String> includes, List<ClassNode> excludeTypes, List<ClassNode> includeTypes, String typeName)

  - ### checkPropertyList

    public boolean checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields)

  - ### checkPropertyList

    public boolean checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields, boolean includeSuperProperties, boolean allProperties)

  - ### checkPropertyList

    public boolean checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields, boolean includeSuperProperties, boolean allProperties, boolean includeSuperFields, boolean includeStatic)