Class MappingAnnotationMetadataDelegate

java.lang.Object
io.micronaut.inject.annotation.MappingAnnotationMetadataDelegate
All Implemented Interfaces:
AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource
Direct Known Subclasses:
EvaluatedAnnotationMetadata

public abstract sealed class MappingAnnotationMetadataDelegate extends Object implements AnnotationMetadataDelegate permits EvaluatedAnnotationMetadata (not exhaustive)
Abstract annotation metadata delegate for cases when annotation values need to be mapped before being returned.

When the target metadata is an AnnotationMetadataHierarchy the occurrence semantics of the hierarchy have to be preserved: reads that resolve a single value consult one layer at a time instead of going through the merging AnnotationMetadataHierarchy.findAnnotation(String). That is achieved by delegating such reads to a copy of the hierarchy where every layer is itself wrapped in a mapping delegate, so that the values of the layer that answers are still mapped.

Since:
4.0.0
Author:
Sergey Gavrilov