Class AnnotationMetadataHierarchy

java.lang.Object
io.micronaut.inject.annotation.AnnotationMetadataHierarchy
All Implemented Interfaces:
AnnotationMetadata, AnnotationSource, Iterable<AnnotationMetadata>

public final class AnnotationMetadataHierarchy extends Object implements AnnotationMetadata, Iterable<AnnotationMetadata>
Used to represent an annotation metadata hierarchy. The first AnnotationMetadata instance passed to the constructor represents the annotation metadata that is declared, hence methods like hasDeclaredAnnotation(String) will return true for the last annotation metadata passed in the hierarchy.

This class is used to internally optimize memory usage and compilation time for classes that declare AOP advice at the type level and where the classes methods typically don't include any annotations and therefore would be wasteful to generate additional annotation metadata classes.

Since:
1.3.0
Author:
graemerocher