Package io.micronaut.inject.annotation
Interface AnnotationTransformer<T extends java.lang.annotation.Annotation>
-
- Type Parameters:
T
- The annotation type
- All Known Subinterfaces:
NamedAnnotationTransformer
,TypedAnnotationTransformer<T>
- All Known Implementing Classes:
CoreNonNullTransformer
,CoreNullableTransformer
,JakartaPostConstructTransformer
,JakartaPreDestroyTransformer
,KotlinNotNullMapper
,KotlinNullableMapper
public interface AnnotationTransformer<T extends java.lang.annotation.Annotation>
AnAnnotationTransformer
transforms an annotation definition into one or many other annotation definitions discarding the original annotation.Unlike
AnnotationMapper
which retains the original annotation information this interface can be used to optimize produced annotation metadata and discard unnecessary annotations.- Since:
- 2.0
- See Also:
AnnotationMapper
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<io.micronaut.core.annotation.AnnotationValue<?>>
transform(io.micronaut.core.annotation.AnnotationValue<T> annotation, VisitorContext visitorContext)
The transform method will be called for each instances of the annotation returned via this method.
-
-
-
Method Detail
-
transform
java.util.List<io.micronaut.core.annotation.AnnotationValue<?>> transform(io.micronaut.core.annotation.AnnotationValue<T> annotation, VisitorContext visitorContext)
The transform method will be called for each instances of the annotation returned via this method.- Parameters:
annotation
- The annotation valuesvisitorContext
- The context that is being visited- Returns:
- A list of zero or many annotations and values to map to
-
-