Class AbstractElementAnnotationMetadataFactory<K,A>
java.lang.Object
io.micronaut.inject.ast.annotation.AbstractElementAnnotationMetadataFactory<K,A>
- Type Parameters:
K
- The element typeA
- The annotation type
- All Implemented Interfaces:
ElementAnnotationMetadataFactory
- Direct Known Subclasses:
GroovyElementAnnotationMetadataFactory
,JavaElementAnnotationMetadataFactory
public abstract class AbstractElementAnnotationMetadataFactory<K,A>
extends Object
implements ElementAnnotationMetadataFactory
Abstract element annotation metadata factory.
- Since:
- 4.0.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
Abstract implementation ofElementAnnotationMetadata
.protected class
Abstract mutable implementation ofElementAnnotationMetadata
. -
Field Summary
Modifier and TypeFieldDescriptionprotected final boolean
protected final AbstractAnnotationMetadataBuilder<K,
A> -
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractElementAnnotationMetadataFactory
(boolean isReadOnly, AbstractAnnotationMetadataBuilder<K, A> metadataBuilder) -
Method Summary
Modifier and TypeMethodDescriptionBuild new element annotation metadata from the element.Build new generic element type annotation metadata from the class element.buildMutable
(AnnotationMetadata originalAnnotationMetadata) Build new mutable element annotation metadata.buildTypeAnnotations
(ClassElement element) Build new class element type annotation metadata from the class element.protected K
getNativeElement
(Element element) Resolve native element.lookupForClass
(ClassElement classElement) Lookup annotation metadata for the class.lookupForField
(FieldElement fieldElement) Lookup annotation metadata for the field.lookupForMethod
(MethodElement methodElement) Lookup annotation metadata for the method.lookupForPackage
(PackageElement packageElement) Lookup annotation metadata for the package.lookupForParameter
(ParameterElement parameterElement) Lookup annotation metadata for the parameter.lookupTypeAnnotationsForClass
(ClassElement classElement) Lookup annotation metadata for the class.lookupTypeAnnotationsForGenericPlaceholder
(GenericPlaceholderElement placeholderElement) Lookup annotation metadata for the placeholder.lookupTypeAnnotationsForWildcard
(WildcardElement wildcardElement) Lookup annotation metadata for the wildcard.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.inject.ast.annotation.ElementAnnotationMetadataFactory
readOnly
-
Field Details
-
isReadOnly
protected final boolean isReadOnly -
metadataBuilder
-
-
Constructor Details
-
AbstractElementAnnotationMetadataFactory
protected AbstractElementAnnotationMetadataFactory(boolean isReadOnly, AbstractAnnotationMetadataBuilder<K, A> metadataBuilder)
-
-
Method Details
-
build
Description copied from interface:ElementAnnotationMetadataFactory
Build new element annotation metadata from the element.- Specified by:
build
in interfaceElementAnnotationMetadataFactory
- Parameters:
element
- The element- Returns:
- the element's metadata
-
buildMutable
Description copied from interface:ElementAnnotationMetadataFactory
Build new mutable element annotation metadata.- Specified by:
buildMutable
in interfaceElementAnnotationMetadataFactory
- Parameters:
originalAnnotationMetadata
- The preloaded annotation- Returns:
- the element's metadata
-
buildTypeAnnotations
Description copied from interface:ElementAnnotationMetadataFactory
Build new class element type annotation metadata from the class element.- Specified by:
buildTypeAnnotations
in interfaceElementAnnotationMetadataFactory
- Parameters:
element
- The element- Returns:
- the element's metadata
-
buildGenericTypeAnnotations
Description copied from interface:ElementAnnotationMetadataFactory
Build new generic element type annotation metadata from the class element.- Specified by:
buildGenericTypeAnnotations
in interfaceElementAnnotationMetadataFactory
- Parameters:
element
- The element- Returns:
- the element's metadata
-
getNativeElement
Resolve native element.- Parameters:
element
- The element- Returns:
- The native element
-
lookupForPackage
protected AbstractAnnotationMetadataBuilder.CachedAnnotationMetadata lookupForPackage(PackageElement packageElement) Lookup annotation metadata for the package.- Parameters:
packageElement
- The element- Returns:
- The annotation metadata
-
lookupForParameter
protected AbstractAnnotationMetadataBuilder.CachedAnnotationMetadata lookupForParameter(ParameterElement parameterElement) Lookup annotation metadata for the parameter.- Parameters:
parameterElement
- The element- Returns:
- The annotation metadata
-
lookupForField
protected AbstractAnnotationMetadataBuilder.CachedAnnotationMetadata lookupForField(FieldElement fieldElement) Lookup annotation metadata for the field.- Parameters:
fieldElement
- The element- Returns:
- The annotation metadata
-
lookupForMethod
protected AbstractAnnotationMetadataBuilder.CachedAnnotationMetadata lookupForMethod(MethodElement methodElement) Lookup annotation metadata for the method.- Parameters:
methodElement
- The element- Returns:
- The annotation metadata
-
lookupForClass
protected AbstractAnnotationMetadataBuilder.CachedAnnotationMetadata lookupForClass(ClassElement classElement) Lookup annotation metadata for the class.- Parameters:
classElement
- The element- Returns:
- The annotation metadata
-
lookupTypeAnnotationsForClass
protected AbstractAnnotationMetadataBuilder.CachedAnnotationMetadata lookupTypeAnnotationsForClass(ClassElement classElement) Lookup annotation metadata for the class.- Parameters:
classElement
- The element- Returns:
- The annotation metadata
-
lookupTypeAnnotationsForGenericPlaceholder
protected AbstractAnnotationMetadataBuilder.CachedAnnotationMetadata lookupTypeAnnotationsForGenericPlaceholder(GenericPlaceholderElement placeholderElement) Lookup annotation metadata for the placeholder.- Parameters:
placeholderElement
- The element- Returns:
- The annotation metadata
-
lookupTypeAnnotationsForWildcard
protected AbstractAnnotationMetadataBuilder.CachedAnnotationMetadata lookupTypeAnnotationsForWildcard(WildcardElement wildcardElement) Lookup annotation metadata for the wildcard.- Parameters:
wildcardElement
- The element- Returns:
- The annotation metadata
-