Top Fields Constructors Methods
org.codehaus.groovy.transform

public abstract Class AbstractASTTransformation

extends Object
implements Opcodes, ASTTransformation, ErrorCollecting
Class Inheritance
All Implemented Interfaces
org.codehaus.groovy.transform.ErrorCollecting, org.codehaus.groovy.transform.ASTTransformation, org.objectweb.asm.Opcodes
Known Direct Subclasses
org.codehaus.groovy.transform.AutoCloneASTTransformation, org.codehaus.groovy.transform.AutoFinalASTTransformation, org.codehaus.groovy.transform.AutoImplementASTTransformation, org.codehaus.groovy.transform.BaseScriptASTTransformation, org.codehaus.groovy.transform.BuilderASTTransformation, org.codehaus.groovy.transform.DelegateASTTransformation, org.codehaus.groovy.transform.EqualsAndHashCodeASTTransformation, org.codehaus.groovy.transform.ExternalizeMethodsASTTransformation, org.codehaus.groovy.transform.ExternalizeVerifierASTTransformation, org.codehaus.groovy.transform.ImmutableASTTransformation, org.codehaus.groovy.transform.IndexedPropertyASTTransformation, org.codehaus.groovy.transform.InheritConstructorsASTTransformation, org.codehaus.groovy.transform.LazyASTTransformation, org.codehaus.groovy.transform.LogASTTransformation, org.codehaus.groovy.transform.MemoizedASTTransformation, org.codehaus.groovy.transform.NamedVariantASTTransformation, org.codehaus.groovy.transform.NullCheckASTTransformation, org.codehaus.groovy.transform.PackageScopeASTTransformation, org.codehaus.groovy.transform.ReadWriteLockASTTransformation, org.codehaus.groovy.transform.SingletonASTTransformation, org.codehaus.groovy.transform.SortableASTTransformation, org.codehaus.groovy.transform.SourceURIASTTransformation, org.codehaus.groovy.transform.SynchronizedASTTransformation, org.codehaus.groovy.transform.ToStringASTTransformation, org.codehaus.groovy.transform.TupleConstructorASTTransformation, org.codehaus.groovy.transform.trait.TraitASTTransformation, org.codehaus.groovy.ast.MixinASTTransformation, org.codehaus.groovy.transform.MapConstructorASTTransformation
Imports
org.apache.groovy.ast.tools.AnnotatedNodeUtils, .MethodNodeUtils, org.codehaus.groovy.GroovyBugError, org.codehaus.groovy.ast.ASTNode, .AnnotatedNode, .AnnotationNode, .ClassHelper, .ClassNode, .FieldNode, .MethodNode, .PropertyNode, org.codehaus.groovy.ast.expr.ClassExpression, .ConstantExpression, .Expression, .ListExpression, .VariableExpression, org.codehaus.groovy.ast.tools.BeanUtils, .GeneralUtils, .GenericsUtils, org.codehaus.groovy.control.SourceUnit, org.codehaus.groovy.runtime.StringGroovyMethods, org.objectweb.asm.Opcodes, java.lang.annotation.Retention, java.util.ArrayList, .Arrays, .HashMap, .LinkedList, .List, .Map

Field Summary

Modifier and TypeField and Description
public static final ClassNode
protected SourceUnit

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
protected boolean
checkIncludeExclude(AnnotationNode node, List<String> excludes, List<String> includes, String typeName)

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

Deprecated
protected boolean
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)

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

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

public 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(final AnnotatedNode annotatedNode, String myTypeName)

Copies all candidateAnnotations with retention policy java.lang.annotation.RetentionPolicy#RUNTIME and java.lang.annotation.RetentionPolicy#CLASS.

protected List<AnnotationNode>
copyAnnotatedNodeAnnotations(final AnnotatedNode annotatedNode, String myTypeName, boolean includeGenerated)

Copies all candidateAnnotations with retention policy java.lang.annotation.RetentionPolicy#RUNTIME and java.lang.annotation.RetentionPolicy#CLASS.

public static boolean
public String

Returns:

The simple name of the annotation including the "@" or null if no such name is defined
getAnnotationName
()

If the transform is associated with a single annotation, returns a name suitable for displaying in error messages.

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

Deprecated
public List<ClassNode>
public ClassNode
public ClassNode
public int
public static List<String>
getMemberList(AnnotationNode anno, String name)

Deprecated
public static List<String>
public static String
public static String
public Object
private static List<ClassNode>
getTypeList(ListExpression listExpression)

private static List<String>
public boolean
hasAnnotation(ClassNode node, ClassNode annotation)

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

private static boolean
public boolean
public static ClassNode
nonGeneric(ClassNode type)

Deprecated use GenericsUtils#nonGeneric
public static boolean
shouldSkip(String name, List<String> excludes, List<String> includes)

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

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

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

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

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

public static List<String>
tokenize(String rawExcludes)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

RETENTION_CLASSNODEback to summary
public static final ClassNode RETENTION_CLASSNODE
sourceUnitback to summary
protected SourceUnit sourceUnit

Constructor Detail

AbstractASTTransformationback to summary
public AbstractASTTransformation()

Method Detail

addErrorback to summary
public void addError(String msg, ASTNode expr)

Implements org.codehaus.groovy.transform.ErrorCollecting.addError.

checkIncludeExcludeback to summary
protected boolean checkIncludeExclude(AnnotationNode node, List<String> excludes, List<String> includes, String typeName)

Deprecated

Annotations
@Deprecated
checkIncludeExcludeback to summary
protected void checkIncludeExclude(AnnotationNode node, List<String> excludes, List<String> includes, List<ClassNode> excludeTypes, List<ClassNode> includeTypes, String typeName)

Deprecated

Annotations
@Deprecated
checkIncludeExcludeUndefinedAwareback to summary
protected boolean checkIncludeExcludeUndefinedAware(AnnotationNode node, List<String> excludes, List<String> includes, String typeName)
checkIncludeExcludeUndefinedAwareback to summary
protected void checkIncludeExcludeUndefinedAware(AnnotationNode node, List<String> excludes, List<String> includes, List<ClassNode> excludeTypes, List<ClassNode> includeTypes, String typeName)
checkNotInterfaceback to summary
protected boolean checkNotInterface(ClassNode cNode, String annotationName)
checkPropertyListback to summary
public boolean checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields)
checkPropertyListback to summary
public boolean checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields, boolean includeSuperProperties, boolean allProperties)
checkPropertyListback to summary
public boolean checkPropertyList(ClassNode cNode, List<String> propertyNameList, String listName, AnnotationNode anno, String typeName, boolean includeFields, boolean includeSuperProperties, boolean allProperties, boolean includeSuperFields, boolean includeStatic)
copyAnnotatedNodeAnnotationsback to summary
protected List<AnnotationNode> copyAnnotatedNodeAnnotations(final AnnotatedNode annotatedNode, String myTypeName)

Copies all candidateAnnotations with retention policy java.lang.annotation.RetentionPolicy#RUNTIME and java.lang.annotation.RetentionPolicy#CLASS.

Annotations with org.codehaus.groovy.runtime.GeneratedClosure members are not supported for now.

copyAnnotatedNodeAnnotationsback to summary
protected List<AnnotationNode> copyAnnotatedNodeAnnotations(final AnnotatedNode annotatedNode, String myTypeName, boolean includeGenerated)

Copies all candidateAnnotations with retention policy java.lang.annotation.RetentionPolicy#RUNTIME and java.lang.annotation.RetentionPolicy#CLASS.

Annotations with org.codehaus.groovy.runtime.GeneratedClosure members are not supported for now.

deemedInternalNameback to summary
public static boolean deemedInternalName(String name)
getAnnotationNameback to summary
public String getAnnotationName()

If the transform is associated with a single annotation, returns a name suitable for displaying in error messages.

Returns:String

The simple name of the annotation including the "@" or null if no such name is defined

getClassListback to summary
public List<ClassNode> getClassList(AnnotationNode anno, String name)

Deprecated

Annotations
@Deprecated
getMemberClassListback to summary
public List<ClassNode> getMemberClassList(AnnotationNode anno, String name)
getMemberClassValueback to summary
public ClassNode getMemberClassValue(AnnotationNode node, String name)
getMemberClassValueback to summary
public ClassNode getMemberClassValue(AnnotationNode node, String name, ClassNode defaultValue)
getMemberIntValueback to summary
public int getMemberIntValue(AnnotationNode node, String name)
getMemberListback to summary
public static List<String> getMemberList(AnnotationNode anno, String name)

Deprecated

Annotations
@Deprecated
getMemberStringListback to summary
public static List<String> getMemberStringList(AnnotationNode anno, String name)
getMemberStringValueback to summary
public static String getMemberStringValue(AnnotationNode node, String name, String defaultValue)
getMemberStringValueback to summary
public static String getMemberStringValue(AnnotationNode node, String name)
getMemberValueback to summary
public Object getMemberValue(AnnotationNode node, String name)
getTypeListback to summary
private static List<ClassNode> getTypeList(ListExpression listExpression)
getValueStringListback to summary
private static List<String> getValueStringList(ListExpression listExpression)
hasAnnotationback to summary
public boolean hasAnnotation(ClassNode node, ClassNode annotation)
initback to summary
protected void init(ASTNode[] nodes, SourceUnit sourceUnit)
isUndefinedMarkerListback to summary
private static boolean isUndefinedMarkerList(ListExpression listExpression)
memberHasValueback to summary
public boolean memberHasValue(AnnotationNode node, String name, Object value)
nonGenericback to summary
public static ClassNode nonGeneric(ClassNode type)

Deprecated

use GenericsUtils#nonGeneric

Annotations
@Deprecated
shouldSkipback to summary
public static boolean shouldSkip(String name, List<String> excludes, List<String> includes)
shouldSkipback to summary
public static boolean shouldSkip(String name, List<String> excludes, List<String> includes, boolean allNames)
shouldSkipOnDescriptorback to summary
public static boolean shouldSkipOnDescriptor(boolean checkReturn, Map<K, V> genericsSpec, MethodNode mNode, List<ClassNode> excludeTypes, List<ClassNode> includeTypes)

Deprecated

Annotations
@Deprecated
shouldSkipOnDescriptorUndefinedAwareback to summary
public static boolean shouldSkipOnDescriptorUndefinedAware(boolean checkReturn, Map<K, V> genericsSpec, MethodNode mNode, List<ClassNode> excludeTypes, List<ClassNode> includeTypes)
shouldSkipUndefinedAwareback to summary
public static boolean shouldSkipUndefinedAware(String name, List<String> excludes, List<String> includes)
shouldSkipUndefinedAwareback to summary
public static boolean shouldSkipUndefinedAware(String name, List<String> excludes, List<String> includes, boolean allNames)
tokenizeback to summary
public static List<String> tokenize(String rawExcludes)