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
,SingletonASTTransformation
,SortableASTTransformation
,SourceURIASTTransformation
,SynchronizedASTTransformation
,TailRecursiveASTTransformation
,ToStringASTTransformation
,TraitASTTransformation
,TupleConstructorASTTransformation
public abstract class AbstractASTTransformation
extends Object
implements ASTTransformation, ErrorCollecting
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 policyRetentionPolicy.RUNTIME
andRetentionPolicy.CLASS
.protected List<AnnotationNode>
copyAnnotatedNodeAnnotations
(AnnotatedNode annotatedNode, String myTypeName, boolean includeGenerated) Copies all candidateAnnotations with retention policyRetentionPolicy.RUNTIME
andRetentionPolicy.CLASS
.static boolean
deemedInternalName
(String name) If the transform is associated with a single annotation, returns a name suitable for displaying in error messages.getMemberClassList
(AnnotationNode anno, String name) getMemberClassValue
(AnnotationNode node, String name) getMemberClassValue
(AnnotationNode node, String name, ClassNode defaultValue) int
getMemberIntValue
(AnnotationNode node, String name) getMemberStringList
(AnnotationNode anno, String name) static String
getMemberStringValue
(AnnotationNode node, String name) static String
getMemberStringValue
(AnnotationNode node, String name, String defaultValue) 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
static boolean
static boolean
shouldSkipOnDescriptorUndefinedAware
(boolean checkReturn, Map genericsSpec, MethodNode mNode, List<ClassNode> excludeTypes, List<ClassNode> includeTypes) static boolean
static boolean
shouldSkipUndefinedAware
(String name, List<String> excludes, List<String> includes, boolean allNames) 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
-
sourceUnit
-
-
Constructor Details
-
AbstractASTTransformation
public AbstractASTTransformation()
-
-
Method Details
-
copyAnnotatedNodeAnnotations
protected List<AnnotationNode> copyAnnotatedNodeAnnotations(AnnotatedNode annotatedNode, String myTypeName) Copies all candidateAnnotations with retention policyRetentionPolicy.RUNTIME
andRetentionPolicy.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 policyRetentionPolicy.RUNTIME
andRetentionPolicy.CLASS
.Annotations with
GeneratedClosure
members are not supported for now. -
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
-
memberHasValue
-
getMemberValue
-
getMemberStringValue
-
getMemberStringValue
-
getMemberIntValue
-
getMemberClassValue
-
getMemberClassValue
-
getMemberStringList
-
getMemberClassList
-
addError
- Specified by:
addError
in interfaceErrorCollecting
-
checkNotInterface
-
hasAnnotation
-
tokenize
-
deemedInternalName
-
shouldSkipUndefinedAware
-
shouldSkipUndefinedAware
-
shouldSkip
-
shouldSkip
-
shouldSkipOnDescriptorUndefinedAware
-
checkIncludeExcludeUndefinedAware
-
checkIncludeExcludeUndefinedAware
-
checkPropertyList
-
checkPropertyList
-
checkPropertyList
-