public abstract class AbstractGroovyElement extends Object implements AnnotationMetadataDelegate, Element
| Modifier and Type | Field and Description | 
|---|---|
protected org.codehaus.groovy.control.CompilationUnit | 
compilationUnit  | 
protected org.codehaus.groovy.control.SourceUnit | 
sourceUnit  | 
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBEREMPTY| Constructor and Description | 
|---|
AbstractGroovyElement(org.codehaus.groovy.control.SourceUnit sourceUnit,
                     org.codehaus.groovy.control.CompilationUnit compilationUnit,
                     org.codehaus.groovy.ast.AnnotatedNode annotatedNode,
                     AnnotationMetadata annotationMetadata)
Default constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected Map<String,org.codehaus.groovy.ast.ClassNode> | 
alignNewGenericsInfo(org.codehaus.groovy.ast.GenericsType[] genericsTypes,
                    org.codehaus.groovy.ast.GenericsType[] redirectTypes,
                    Map<String,org.codehaus.groovy.ast.ClassNode> genericsSpec)
Align the given generic types. 
 | 
<T extends Annotation> | 
annotate(String annotationType,
        Consumer<AnnotationValueBuilder<T>> consumer)
Annotate this element with the given annotation type. 
 | 
AnnotationMetadata | 
getAnnotationMetadata()
Supplies the metadata. 
 | 
protected ClassElement | 
getGenericElement(org.codehaus.groovy.control.SourceUnit sourceUnit,
                 org.codehaus.groovy.ast.ClassNode type,
                 ClassElement rawElement,
                 Map<String,org.codehaus.groovy.ast.ClassNode> genericsSpec)
Get a generic element for the given element and data. 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitannotate, annotate, annotate, getDocumentation, getName, getNativeType, getSimpleName, isAbstract, isFinal, isPrivate, isProtected, isPublic, isStaticbooleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypehasSimpleAnnotation, hasSimpleDeclaredAnnotationisDeclaredNullable, isNullableprotected final org.codehaus.groovy.control.SourceUnit sourceUnit
protected final org.codehaus.groovy.control.CompilationUnit compilationUnit
public AbstractGroovyElement(org.codehaus.groovy.control.SourceUnit sourceUnit,
                             org.codehaus.groovy.control.CompilationUnit compilationUnit,
                             org.codehaus.groovy.ast.AnnotatedNode annotatedNode,
                             AnnotationMetadata annotationMetadata)
sourceUnit - The source unitcompilationUnit - The compilation unitannotatedNode - The annotated nodeannotationMetadata - The annotation metadatapublic AnnotationMetadata getAnnotationMetadata()
AnnotationMetadataProviderAnnotationMetadata.EMPTY_METADATA.getAnnotationMetadata in interface AnnotationMetadataProviderAnnotationMetadata@CompileStatic public <T extends Annotation> Element annotate(@Nonnull String annotationType, @Nonnull Consumer<AnnotationValueBuilder<T>> consumer)
Elementannotate in interface ElementT - The annotation generic typeannotationType - The annotation typeconsumer - A function that receives the AnnotationValueBuilderprotected Map<String,org.codehaus.groovy.ast.ClassNode> alignNewGenericsInfo(@Nonnull org.codehaus.groovy.ast.GenericsType[] genericsTypes, @Nonnull org.codehaus.groovy.ast.GenericsType[] redirectTypes, @Nonnull Map<String,org.codehaus.groovy.ast.ClassNode> genericsSpec)
genericsTypes - The generic typesredirectTypes - The redirect typesgenericsSpec - The current generics spec@Nonnull protected ClassElement getGenericElement(@Nonnull org.codehaus.groovy.control.SourceUnit sourceUnit, @Nonnull org.codehaus.groovy.ast.ClassNode type, @Nonnull ClassElement rawElement, @Nonnull Map<String,org.codehaus.groovy.ast.ClassNode> genericsSpec)
sourceUnit - The source unittype - The typerawElement - A raw element to fall back togenericsSpec - The generics spec