public abstract class AbstractGroovyElement
extends java.lang.Object
implements io.micronaut.core.annotation.AnnotationMetadataDelegate, io.micronaut.inject.ast.Element
| Modifier and Type | Field and Description |
|---|---|
protected org.codehaus.groovy.control.CompilationUnit |
compilationUnit |
protected org.codehaus.groovy.control.SourceUnit |
sourceUnit |
protected GroovyVisitorContext |
visitorContext |
| Constructor and Description |
|---|
AbstractGroovyElement(GroovyVisitorContext visitorContext,
org.codehaus.groovy.ast.AnnotatedNode annotatedNode,
io.micronaut.core.annotation.AnnotationMetadata annotationMetadata)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<java.lang.String,org.codehaus.groovy.ast.ClassNode> |
alignNewGenericsInfo(org.codehaus.groovy.ast.GenericsType[] genericsTypes,
org.codehaus.groovy.ast.GenericsType[] redirectTypes,
java.util.Map<java.lang.String,org.codehaus.groovy.ast.ClassNode> genericsSpec)
Align the given generic types.
|
<T extends java.lang.annotation.Annotation> |
annotate(io.micronaut.core.annotation.AnnotationValue<T> annotationValue) |
<T extends java.lang.annotation.Annotation> |
annotate(java.lang.String annotationType,
java.util.function.Consumer<io.micronaut.core.annotation.AnnotationValueBuilder<T>> consumer) |
boolean |
equals(java.lang.Object o) |
io.micronaut.core.annotation.AnnotationMetadata |
getAnnotationMetadata() |
protected io.micronaut.inject.ast.ClassElement |
getGenericElement(org.codehaus.groovy.control.SourceUnit sourceUnit,
org.codehaus.groovy.ast.ClassNode type,
io.micronaut.inject.ast.ClassElement rawElement,
java.util.Map<java.lang.String,org.codehaus.groovy.ast.ClassNode> genericsSpec)
Get a generic element for the given element and data.
|
int |
hashCode() |
boolean |
isPackagePrivate() |
io.micronaut.inject.ast.Element |
removeAnnotation(java.lang.String annotationType) |
<T extends java.lang.annotation.Annotation> |
removeAnnotationIf(java.util.function.Predicate<io.micronaut.core.annotation.AnnotationValue<T>> predicate) |
io.micronaut.inject.ast.Element |
removeStereotype(java.lang.String annotationType) |
protected io.micronaut.core.annotation.AnnotationMetadata |
resolveAnnotationMetadata(org.codehaus.groovy.ast.ClassNode type)
Resolves the annotation metadata for the given type.
|
protected java.util.Set<io.micronaut.inject.ast.ElementModifier> |
resolveModifiers(org.codehaus.groovy.ast.ClassNode classNode)
Resolve modifiers for a class node.
|
protected java.util.Set<io.micronaut.inject.ast.ElementModifier> |
resolveModifiers(org.codehaus.groovy.ast.FieldNode fieldNode)
Resolve modifiers for a field node.
|
protected java.util.Set<io.micronaut.inject.ast.ElementModifier> |
resolveModifiers(org.codehaus.groovy.ast.MethodNode methodNode)
Resolve modifiers for a method node.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitannotate, annotate, annotate, getDescription, getDescription, getDocumentation, getModifiers, getName, getNativeType, getSimpleName, isAbstract, isFinal, isPrivate, isProtected, isPublic, isStatic, removeAnnotation, removeStereotypebooleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeprotected final org.codehaus.groovy.control.SourceUnit sourceUnit
protected final org.codehaus.groovy.control.CompilationUnit compilationUnit
protected final GroovyVisitorContext visitorContext
public AbstractGroovyElement(GroovyVisitorContext visitorContext, org.codehaus.groovy.ast.AnnotatedNode annotatedNode, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata)
visitorContext - The groovy visitor contextannotatedNode - The annotated nodeannotationMetadata - The annotation metadatapublic io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()
getAnnotationMetadata in interface io.micronaut.core.annotation.AnnotationMetadataProviderpublic boolean isPackagePrivate()
isPackagePrivate in interface io.micronaut.inject.ast.Element@CompileStatic
public <T extends java.lang.annotation.Annotation> io.micronaut.inject.ast.Element annotate(@NonNull
java.lang.String annotationType,
@NonNull
java.util.function.Consumer<io.micronaut.core.annotation.AnnotationValueBuilder<T>> consumer)
annotate in interface io.micronaut.inject.ast.Elementpublic <T extends java.lang.annotation.Annotation> io.micronaut.inject.ast.Element annotate(io.micronaut.core.annotation.AnnotationValue<T> annotationValue)
annotate in interface io.micronaut.inject.ast.Elementpublic io.micronaut.inject.ast.Element removeAnnotation(@NonNull
java.lang.String annotationType)
removeAnnotation in interface io.micronaut.inject.ast.Elementpublic <T extends java.lang.annotation.Annotation> io.micronaut.inject.ast.Element removeAnnotationIf(@NonNull
java.util.function.Predicate<io.micronaut.core.annotation.AnnotationValue<T>> predicate)
removeAnnotationIf in interface io.micronaut.inject.ast.Elementpublic io.micronaut.inject.ast.Element removeStereotype(@NonNull
java.lang.String annotationType)
removeStereotype in interface io.micronaut.inject.ast.Elementprotected java.util.Map<java.lang.String,org.codehaus.groovy.ast.ClassNode> alignNewGenericsInfo(@NonNull
org.codehaus.groovy.ast.GenericsType[] genericsTypes,
@NonNull
org.codehaus.groovy.ast.GenericsType[] redirectTypes,
@NonNull
java.util.Map<java.lang.String,org.codehaus.groovy.ast.ClassNode> genericsSpec)
genericsTypes - The generic typesredirectTypes - The redirect typesgenericsSpec - The current generics spec@NonNull
protected io.micronaut.inject.ast.ClassElement getGenericElement(@NonNull
org.codehaus.groovy.control.SourceUnit sourceUnit,
@NonNull
org.codehaus.groovy.ast.ClassNode type,
@NonNull
io.micronaut.inject.ast.ClassElement rawElement,
@NonNull
java.util.Map<java.lang.String,org.codehaus.groovy.ast.ClassNode> genericsSpec)
sourceUnit - The source unittype - The typerawElement - A raw element to fall back togenericsSpec - The generics spec@NonNull
protected io.micronaut.core.annotation.AnnotationMetadata resolveAnnotationMetadata(@NonNull
org.codehaus.groovy.ast.ClassNode type)
type - The typepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectprotected java.util.Set<io.micronaut.inject.ast.ElementModifier> resolveModifiers(org.codehaus.groovy.ast.MethodNode methodNode)
methodNode - The method nodeprotected java.util.Set<io.micronaut.inject.ast.ElementModifier> resolveModifiers(org.codehaus.groovy.ast.FieldNode fieldNode)
fieldNode - The field nodeprotected java.util.Set<io.micronaut.inject.ast.ElementModifier> resolveModifiers(org.codehaus.groovy.ast.ClassNode classNode)
classNode - The class node